Command su
The format is:su [-] username, the back can follow-, also can not follow.
When a normal user's SU command is not username, it is equivalent to switching to the root user and vice versa. When the SU command is added-the various environment variables of the current user are initialized.
If you do not add-switch to the root user, the current directory does not change, and if you add-switch to the root account, the current directory is the home directory of the root account.
Note: When you switch from root to a normal user, you do not need to enter a password .
Command sudo
Because the current directory or the/root,zoctopus account does not have any permissions after switching to the Zoctopus account, I will not be prompted enough when I use the command ls to view it. However, when I use sudo ls to enter the Zoctopus account's own password, I have this permission.
Linux command _ User identity switch