Create user defined command

I am new to Latex, I need to create a user defined command or Macro. I need to print unix shell commands on a pdf, the code looks like below

\begin{lstlisting}[language=bash]
\end{shell}

\end{document}