Raspberry_Pi_Education_Manual

Notes:

Navigating the file system using “cd”

The file system in Linux is hierarchical with nested directories (often called “ folders ”) in a “ tree ”. The top of the directory structure is denoted by the symbol “/”, and directories underneath “/” are referred to using “ paths ”, just like URLs in a web browser. To go to a particular place in the directory structure, you use the command “ cd ”, which stands for “change directory”, followed by its location in the tree. For instance, the following command will take you to Brian’s “Documents” folder in his home directory.

cd /home/brian/Documents

If you want to move up the directory tree, use the command:

cd ..

For example, if you’re working in the folder “/home/brian/Documents/Project”, the command “cd ..” would take you back to “/home/brian/Documents”. Make sure you leave a space between the letters “cd” and the two dots, otherwise the command won’t work.

Tip...

The names of files and directories (folders) are case-sensitive in Linux, so the file “my_stuff” is different from the file “My_stuff”.

To find out more about the “cd” command see its Wikipedia entry: http://en.wikipedia.org/wiki/Cd_%28command%29

cd Changes the current working directory.

The Linux Command Line

156

Made with FlippingBook flipbook maker