Change directory command
Article Directory
learning target
- Linux cd command can be used to switch to the current user's home directory
1. Change directory command using
command | Explanation |
---|---|
cd directory | Switch to the specified directory |
cd ~ | Switch to the current user's home directory |
cd … | Switch to the parent directory |
cd . | Switch to the current directory |
cd - | Switch to the last directory |
note:
- When the cd command to change the directory, the directory must exist.
- cd do not write back catalog is equivalent to cd ~
cd
Directory renderings:
cd ~
Renderings:
cd ..
Renderings:
cd .
Renderings:
cd -
Renderings:
2. Summary
- cd directory command is a complete switching operation, when the switch directories, the directory must exist.