TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to show terminal commands as well as command prompt commands (windows) and was wondering what is the best way to format these in latex.

share|improve this question
up vote 8 down vote accepted

enter image description here




Hi, I am Garbage Collector!
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

c:\User\Garbage Collector>
share|improve this answer
Nice. I trust the listings package lets the user change the color scheme (as you can do in windows) for printing something other than white text on black. – Ethan Bolker Aug 6 '12 at 20:01
@GarbageCollector: Also the c above is lower case...it is actually upper case in cmd's window. – Matthew Kemnetz Aug 16 '12 at 16:49
@MatthewKemnetz: You are correct. Thanks. – kiss my armpit Aug 16 '12 at 16:56
@GarbageCollector; I was just saying that to again point out that your post isn't a screen shot. It's further proof! – Matthew Kemnetz Aug 16 '12 at 18:12
@MatthewKemnetz: Yes. I understood. Thanks. – kiss my armpit Aug 17 '12 at 8:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.