Linux CD commands can be said to be the most basic Linux command statements, used to switch directories, is the shell's built-in commands, to do other things, are built on the use of CD commands.
Therefore, to learn the common Linux commands, the first step is to learn How to use the CD command skills.
Command format:
CD [-l|-p] [dir]
Command function:
-P If the destination directory you want to switch to is a symbolic connection, switch directly to the destination directory that the symbolic connection is pointing to.
-L If the destination directory that you want to switch is a symbolic connection, switch directly to the directory that the character connection name represents, not the destination directory that the symbolic connection points to.
-When only the "-" option is applied, the current working directory is switched to the directory represented by the environment variable "OLDPWD".
Common examples:
Cd/home/test into the/home/test directory
CD ZB execute the command above and go to the/HOME/TEST/ZB directory
Cd.. Return to the previous level directory, with CD. /
Cd. Current directory, do not switch
CD ~ Switch to the root directory of the current user: If the current user is ZB, go to the/ZB directory
CD-Returns the directory in which the directory was previously entered. such as ①CD/HOME②CD TEST/ZB③CD-at this time in the/home directory
CD/Enter system root directory
CD!$ Use the parameters of the previous command as CD parameters. such as EXAMPLE1:①CD. ②CD!$ equivalent to execute CD. EXAMPLE2:①PWD②CD!$ is equivalent to performing CD pwd at this time
Reference: http://www.cnblogs.com/peida/archive/2012/10/24/2736501.html
Learn a Linux command every DAY--DAY1:CD commands