Newbie School: file path commands in Linux. For more information, see newbie School: file path commands in Linux, absolute path and relative path shel.
Absolute path and relative path
Shell command:
Cd/home: the path with "/" is absolute and directly enters the home directory;
Cd ..: go to the upper-level directory;
Cd-: returns the last Directory;
Pwd: displays the current directory;
Cd ~ : Indicates the current user directory, that is,/home/(user name );
Cd (directory name): relative path,
Ls: Understand the files in the current directory.
Ls-a: view the list of all files in the current directory (including hidden files );
Each directory has two special directories:... and...; "." indicates the current directory; ".." indicates the upper-level directory;
We can
Su username: indicates the user name to be switched. If no target is switched after su, the default value is root;
Su-username: switches the entire environment.