File navigation

To navigate the file system you will need to know a few commands.  To locate where you are in the file system enter the following.

$ pwd

/home/pi

This will display you Present Working Directory:

Enter the following.

$ cd /

Enter the pwd command.

$ pwd

The terminal will display a / meaning that you are at the root of the file system.

Enter cd home

This command will change the directory to the home folder.  Enter the pwd command to confirm this.

/home

Enter the following command.

$ cd pi

Confirm the directory by enter the pwd command.

$ pwd

/home/pi

Move back a directory by enter the following.

cd ..

This will move back a directory.  Make sure you have a space after the cd command.  Confirm this by entering the pwd command.

$ pwd

You can also jump directly down the file system without going into each folder.

$ cd /

Followed by this.

$ cd /home/pi

This command will jump directly down to the pi folder.

File manipulation on the Raspberry Pi

Next Raspberry Pi Week 4 – Day 5 File Manipulation >>