As a variation on the verbatim theme, the numberedblock package allows you to label code blocks with a marginal number, and reference them with \ref. Depending on your application, this may prove useful, too. (see http://ctan.org/pkg/numberedblock)
\documentclass{article}
\usepackage{numberedblock}
\begin{document}
I am in the process of writing a simple manual. In it, I explain how to set up the
files and programs necessary to run a pipeline I have written. I would like to include
command line commands in that file in a way that makes them stand out and easy to read.
Basically, how can I get this effect in my LaTeX document:
\begin{numVblock}[\nbVlabel{nb:A}]
cd ~/foo; mkdir bar
\end{numVblock}
I was thinking along the lines of a \verb|\parbox| and a background color but I was
hoping there might be a class that simplifies this or any other tricks. I don't need
code highlighting, I just need an easy way to differentiate commands from prose.
I can number larger blocks
\begin{numVblock}[\nbVlabel{nb:B}]
program test
implicit none
integer a, x
c$$$$$$$$$$$$$$$$$$$$$$$$$
a = 0
x = 1
10 a = a + x
if (a .eq. 100) stop
goto 10
end
\end{numVblock}
\noindent and can then reference code blocks \ref{nb:A} and \ref{nb:B}.
\end{document}

fancyrvband it's everything I wanted and then some. Thanks! – terdon Sep 24 '14 at 17:59