In Linux, when a user needs to change the current directory then “cd” command is input in the shell.
Syntax: $cd
The purpose that can be fulfilled by the current command are –
- Redirect to a new directory from the current directory.
- Change a directory using absolute path and relative path.
The following commands are under the cd:
- cd ~: Redirect to home directory.
- cd-: Redirect to previous directory.
- cd/: Redirect to entire system directory.