O'Reilly logo

Raspberry Pi For Dummies by Mike Cook, Sean McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning More About Linux Commands

Lots of information about Linux is available on the Internet, but plenty of documentation is also hidden inside the operating system itself. If you want to dig further into what Linux can do, this documentation can point you in the right direction, although some of it is phrased in quite a technical way.

Commands in Linux can take several different forms. They might be built in to the shell itself, they might be separate programs in the /bin directory, or they could be aliases (which are explained in the next section). If you want to look up the documentation for a command, first find out what kind of command it is, using the type command, like this:

pi@raspberrypi ~ $ type cd

cd is a shell builtin

pi@raspberrypi ~ $ type mkdir

mkdir is /bin/mkdir

pi@raspberrypi ~ $ type ls

ls is aliased to ‘ls --color=auto’

If you want to find out where a particular program in installed, use the which command together with the program name:

which mkdir

To get documentation for shell built-ins, you can use the shell’s help facility. Just enter help followed by the filename you’re looking for help with:

help cd

tip.eps The help command’s documentation uses square brackets for different options (which you may omit), and uses a pipe (|) character between items that are mutually exclusive, such as options that mean the opposite to each other.

For commands that are programs, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required