[Tex/LaTex] Best way to show terminal and cmd commands

formatting

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.

Best Answer

enter image description here

\documentclass{article}

\usepackage{xcolor}
\usepackage{listings}


\lstdefinestyle{DOS}
{
    backgroundcolor=\color{black},
    basicstyle=\scriptsize\color{white}\ttfamily
}

\begin{document}
Hi, I am Garbage Collector!
\begin{lstlisting}[style=DOS]
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

c:\User\Garbage Collector>
\end{lstlisting}
\end{document}
Related Question