The difference between Su and su in the Linux shell __linux

Source: Internet
Author: User
Tags switches
The difference between Su and Su-

The former only switches identities, but the shell environment is still the original user's shell, while the user and the shell environment switch to the new user. The PATH environment variable error will not occur until you switch the shell environment.

Specific cases:
Someone logged in with Root. Then switch to the Oracle user and execute the sqlplus command with an error:? Command not found!
is because of the use of Su, not Su-
There's another obvious difference:
For example, the root user in the/root/directory, Su Oracle,
Switched to an Oracle user, but the directory is still under/root/.
If you use Su-oracle
You can find that the directory also switches to the Oracle user's home directory.
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.