The CD is used to change the directory where the user
Absolute path: The path must be written by the root directory "/". For example/usr/local/mysql This is the absolute path.
Relative path: The path is not written by the root directory "/". For example, first the user enters the/and then goes to home.
Grammar
CD (options) (parameters)
Options
-p If the destination directory you want to switch to is a symbolic connection, switch directly to the destination directory to which the symbolic connection is directed-L if the destination directory you want to switch to 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" .
Instance
~- Returns the directory where it was before entering this directory; CD: Returns the parent directory (if the current directory is "/", then "/"after execution). " the meaning of the parent directory); CD.. /!$ Use the parameters of the previous command as CD parameters.
LINUX:CD command Explanation