Linux CD commands can be said to be the most basic Linux command statements, and other command statements to operate, are built on the use of CD on the command.
So, learn Linux? Common command, you must learn first? A CD? tips on how to use commands.
? ? 1.? command format:
CD [directory name ]
? ? 2.? command function:
Toggle Current directory to Dirnam e
? ? 3.? Common examples
3.1. Example one: Enter the system root directory
Command:
CD/
Output:
[[Email protected] ~]# CD/
Note: Enter the system root directory, the above command after the execution of the LS command to see, the current directory has been to the system root directory
???? ??
Command:
Cd..
???? Output:
????
Description
Enter the system root directory to use "? CD?..? " always back, you can reach the root directory
Command:
Cd?.. /..?
Output:
description : Use CD? The command implements the parent directory into the parent directory of the current directory.
Example 2: Use? A CD? command to enter the current user home directory
The "Current User home Directory" and "system root" are two different concepts. There are two methods to enter the current user home directory.
Command 1:
Cd
Output:
command 2 :
CD ~
Output:
Example 3 : Jump to the specified directory
Command :
CD MNT
Output :
Description :
jump to the specified directory, starting at the root directory, and adding / The subdirectories in the current directory can be written directly by name
Example four: return to the directory in which it was before entering this directory
Command :
CD-
Output :
Example five: use the parameters of the previous command as CD parameters.
Command:
CD!$
??
Linux command detailed-CD