Linux command: cd

cd command quick guide, used to change the folder

Once you have the folder, you can usecdcommand.cdmethodCWeldingdprovocative. You call it to specify the folder to move to. You can specify the folder name or the entire path.

example:

mkdir fruits
cd fruits

Now you are infruitsfolder.

you can use it..Indicates the special path of the parent folder:

cd .. #back to the home folder

The # character indicates the beginning of the comment and will continue for the entire line after it is found.

You can use it to form the path:

mkdir fruits
mkdir cars
cd fruits
cd ../cars

There is another special path indicator which is.And indicatecurrentfolder.

You can also use an absolute path starting from the root folder/:

cd /etc

This command can be used in Linux, macOS, WSL and wherever you have a UNIX environment

Download mine for freeLinux Command Manual


More cli tutorials: