Linux CD commands can be said to be the most basic Linux command statements, the other command statements to operate, are based on the use of the CD command.
Therefore, to learn the common Linux commands, the first step is to learn How to use the CD command skills.
1. Command format:
cd [ directory name ]
2. Command function:
Switch current directory to Dirname:
3. Common examples:
column One: Enter the system root directory
Command: CD/
[[Email protected] data]# CD/[[email protected]-study/]#
Real column two: Return to the previous level directory
Command: CD.
pwd/data/pc[[email protected]-study pc]# CD. [[Email protected] pwd/data[[email protected]
Real Column Three: Enter the current user home directory
Command: CD ~
pwd/data[[email protected]-study data]# cd ~[[email protected]pwd/root[[ Email protected]
Real column four: Jump to the specified directory
Command: CD/OPT/RH
[Email protected]/]# cd/opt/rh[[email protected]-study rh]#
Real column Five: returns the directory where it was before entering this directory
Command: CD-
pwd/opt/rh[[email protected]-study rh]# CD-/[[email protected]pwd/[[Email Protected]-study/]# CD-/opt/rh[[email protected]-study rh]#
Linux Learning Path: cd command