UnixDroid

Lesson 3 of 4 · 5 min

cd — moving around

Change directory with absolute and relative paths.

cd means change directory — it moves you to another folder.

cd /home/student/Documents   # absolute path: starts from the top "/"
cd Documents                 # relative path: starts from where you are
cd ..                        # go up one folder
cd ~                         # jump back to your home folder
cd -                         # go back to the previous folder
ShortcutMeans
.this folder
..the folder above
~your home folder

Press Tab while typing a folder name and the shell finishes it for you. It saves time and avoids typos.

Try it yourself
  1. Run cd / and then pwd.
  2. Run cd ~ and check with pwd again.
  3. Try cd .. twice — where do you end up?

Quick check

Which shortcut means "the folder above this one"?

Need a hint?

Two dots.

Finished this lesson?

Done lessons keep your daily streak going 🔥

0 day streak

0 lessons done

best 0 days

Log in to keep your streak on every device →