cd Linux Commands

What is Linux cd Command?

Explanation

cd COMMAND:

cd command is used to change the directory.

SYNTAX :


cd [directory | ~ | ./ | ../ | - ]

OPTIONS:


-L Use the physical directory structure.
-P Forces symbolic links.

EXAMPLE:


  1. cd linux-command
    This command will take you to the sub-directory(linux-command) from its parent directory.
  2. cd ..
    This will change to the parent-directory from the current working directory/sub-directory.
  3. cd ~
    This command will move to the user's home directory which is "/home/username".

Ask Questions

Ask Question