Command Line and Aliases

This section will be an introduction to harnessing the power of the command line. It assumes you are using Ubuntu Linux, more specifically the desktop live CD. It should look pretty similar in any other Linux that is using the BASH shell (almost all do).

Note: in this section, the red text shows what you type in, and anything else represents what you see on the screen, though the colors might not be the same. Here is an example listing files (including hidden files):

In the above example, the part before the dollar sign is the command prompt, where the shell is telling you it is ready to accept your commands. We type in ls -A, which means to list filenames in this directory (folder), and show all files except for the   and .. which mean this current directory and the parent directory, respectively.

We can get more information by asking for a long listing:

This shows permissions, user, group, and last change date for each file.

Opening a terminal

In Ubuntu, click on the Applications menu on the panel at the top of the screen, then choose Accessories and Terminal. We can abbreviate that as Applications -> Accessories -> Terminal.

A bit about Linux for newcomers

A few more comments before we go on:

  • Notice that Linux is case sensitive. That means that the command ls -A is different from ls -a, and we could have a directory named Desktop and another one named desktop.
  • In computers, the words directory and folder are the same thing.

 

Printed from http://bzmx.net/linux — Command Line and Aliases.