In the Linux terminal, you can change the current working directory using the cd
command.
Here’s how you can use the cd
command to change to a different directory:
cd path/to/directory
where path/to/directory
is the path of the directory you want to change to.
For example, to change to the /home
directory, you would use the following command:
cd /home
You can also use the following shortcuts:
cd ..
: Change to the parent directory.cd ~
: Change to your home directory.cd -
: Change to the previous directory.