Linux Command details cd
Command: cd
Switch the current directory to the target directory
Syntax: # cd [directory name]
Example
1. Go to the/home/doiido directory.
# Cd/home/doiido
View the current directory
# Pwd
2. Go to the doiido directory of the current year.
# Cd doiido
In fact, the above two examples involve relative paths and absolute paths. For more information, see relative paths and absolute paths.
Tips for using cd commands:
# Cd to go to the user's home directory
# Cd ~ Go to the user's home directory
# Cd-Return to the directory (upper-level directory) that is located before the directory is entered)
# Cd .. the parent directory is returned. If the current directory is/, the directory is still in the/directory after execution.
# Cd! $ Use the parameters of the previous command as the cd Parameter
This article permanently updates the link address: