How to get to grips with your Raspberry Pi's command line interface

How to get to grips with your Raspberry Pi's command line interface
The command line may look daunting to the uninitiated, but once you master the basics it's an easy beast to tame

As you have no doubt discovered, Raspbian has a graphical interface similar to that of Windows or Mac OS X. You can do most of your day-to-day tasks in this interface. There's a file manager, web browser, text editor and many other useful applications.

However, sometimes you need an interface that's a bit more powerful, and this is where the Command Line Interface (CLI) comes in. It's also known as the Terminal or Shell.

Knowing what commands to use

Pi CLI desktop

At this point, you're probably wondering how on earth you are supposed to know what commands and what flags you can use for a task. Well, there's good news and bad news. The good news is that it's usually not too hard to find out the flags for a command. Most support the -h or --help flags, which should give some information about what flags a command can take and how to use it. For example, if you run ls --help, you'll see a long list of flags and what they all do, including:

-a, --all do not ignore entries starting with .

-l use a long listing format

The second way of finding information on a command is using man. This is short for manual. It takes a single argument, that is, a word after the command that isn't preceded by a hyphen. It then displays information on the command given as an argument.

TOPICS