Who, whoami, and Id of shell commands

Source: Internet
Author: User

root@bt:~/test# who --helpUsage: who [OPTION]... [ FILE | ARG1 ARG2 ]Print information about users who are currently logged in.  -a, --all         same as -b -d --login -p -r -t -T -u  -b, --boot        time of last system boot  -d, --dead        print dead processes  -H, --heading     print line of column headings      --ips         print ips instead of hostnames. with --lookup,                    canonicalizes based on stored IP, if available,                    rather than stored hostname  -l, --login       print system login processes      --lookup      attempt to canonicalize hostnames via DNS  -m                only hostname and user associated with stdin  -p, --process     print active processes spawned by init  -q, --count       all login names and number of users logged on  -r, --runlevel    print current runlevel  -s, --short       print only name, line, and time (default)  -t, --time        print last system clock change  -T, -w, --mesg    add user's message status as +, - or ?  -u, --users       list users logged in      --message     same as -T      --writable    same as -T      --help     display this help and exit      --version  output version information and exit

root@bt:~/test# whoamirootroot@bt:~/test# iduid=0(root) gid=0(root) groups=0(root)root@bt:~/test# 
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.