Understanding SSH CD command

CD command is used for navigation to different directories on a Linux machine. Below I have explained some basic things about CD command.

How to know current directory

If you want to know your current directory, run below command:

pwd

ssh-pwd command

Default directory for root

when you login as root your default directory is

/root

How to move to another directory

Support you want to move to /home directory, use below command

cd /home

To go up a directory

To move to one level up directory use:

cd ..

To go to Top level

cd /

To go to your home directory

cd ~

This will take the use to his home directory. Like for user root home directory is /root

[dedicated_hosting]

Our Top Rated Host

Related Posts