Linux command parsing: suroot and su-root

Source: Internet
Author: User
Linux command parsing: suroot and su-rootsu-rootisthesameassu-justlikeloginasroot, thentheshellisloginshell, whichmeanitwillexpericenealoginprocess, usual... linux command parsing: su root and su-root is the same as su-just like login as root, then the shell is login shell, which mean it will expericene a login process, usually. bash_profile and. bashrc will be sourced su root is the same as sulike you open an interactive sh Ell in root name, then only. bashrc will be sourced. by default, if the user is not added after su, the system switches to rootsu without changing the current variable su-the system switches to the user variable. that is to say, su can only obtain the root execution permission, you cannot obtain the environment variables, while the su-is to switch to the root and get the root environment variables and execution permission syntax: $ su [user_name] su command can be used to interactively change your user ID and group ID. Su is an abbreviation of switch user or set user id. This command enables you to start a sub-process, become a new user ID, and grant you access permissions to all files associated with this user ID. Therefore, for security reasons, you are required to enter the password of this user account when converting your identity. If no parameter exists, the su command converts you to root (system administrator ). The root account is also known as a super user, because this user can access any file in the system. Many people think of the su command as an abbreviation of supper-user. Of course, you must provide the root password. To return to your original user identity, do not use the su command. you only need to use the exit command to exit the new dialog process generated by using the su command. $ Su-username some configuration files are set up for your conversation clues. When you run the su username command, your conversation features the same as your original login identity. If you want your conversation process to have the features of consistent user ID after conversion, you need to use the short slash: su-username
 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.