How can I move to another directory?
Just as you can move around in a file browser by double-clicking on folders,
you can move around in the filesystem using the command cd
(which stands for "change directory").
If you type cd seasonal
and then type pwd
,
the shell will tell you that you are now in /home/repl/seasonal
.
If you then run ls
on its own,
it shows you the contents of /home/repl/seasonal
,
because that's where you are.
If you want to get back to your home directory /home/repl
,
you can use the command cd /home/repl
.
This exercise is part of the course
Introduction to Shell
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
