Salix WebsiteDocumentation Site

4.1.1. Moving Around - cd

You should be in your user directory (denoted as ~), which is normally the same as /home/your_user_name (replace your_user_name with your own). In Salix, this directory contains Desktop, Music, Documents and so on. To see its contents, type ls and press enter. You will see something like this:

  george[~]$ ls
  Desktop      Download    Pictures    Templates    salix
  Documents    Music       Music       Videos

Now to move around directories, we use the command cd. If you just type in cd and enter, it will take you to your home directory, but as we are already there, in this case, nothing will happen. cd must otherwise be followed either by a name of a directory which is within the directory you are in or by a full path to the directory you wish to move into. You can also go one directory up by typing

  cd ..

(be careful, there is a space between cd and .. ). Remember in Linux, arguments are separated by spaces. So for now, let's move to the root directory. The root directory is, as the name suggests, the core of your directories - every directory stems from here.

To move to the root /, type in

  cd /

Type in ls to see the list of files and directories in the directory. You should see something like tmp/, usr/, home and so on. OK, not so interesting here. Let us move back to your home directory with

  cd /home/your_user_name

or just


Now move into the Music directory by issuing

  cd Music

In fact, you do not have to type to the end. By pressing Tab after the first letter or two, you may complete the rest of the directory name automatically.

The important thing to notice here is this is a relative path : unlike where the whole path was specified above, starting from the root of the filesystem /, if the path doesn't begin with / it is understood as starting from whatever the current directory is, in this case, your user's home. So Music, in this case, means the same as /home/your_user_name/Music.