Differences between WHO, whoami and who am I

Source: Internet
Author: User

First, let's take a look at the different results of the three commands entered by common users and root users:

 

The difference is that whoami displays the User Name of the current "Operation user", while who am I displays the User Name of the "Login User.

The Linux term is as follows: (actual user = uid, that is, user ID. Valid user = EUID, I .e. valid user ID)

 

Who am I displays the actual user name, that is, the user ID when the user logs on. This command is equivalent to WHO-M.
Whoami displays a valid user ID (
Operation user).

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.