[User management]--several commands for user function

Source: Internet
Author: User

Finger Command Query User information
Option parameters:
-S: Lists only the user's account number, full name, terminal code and login time, etc.;
-M: List the same person as the account followed, not the partial match (including the full name part)

View user Information # finger lyjlogin:lyj                        /home/lyj                    Shell:/bin/bashnever Lin.  No Mail. No Plan.
View the currently logged on system user and logon time # fingerlogin     Name       Tty      Idle Login hours   Office     Office Phoneroot      root       tty1        2 00:38root      root       pts/0    1:08  2 05:22 (10.0.2.29) root      root       pts/1  2 05:26 (10.0.2.29)


ID command to view the UID, GID, and group information of the user

# ID lyjuid=503(lyj) gid=503(lyj) group =503 (lyj)


W who whoami command

view currently logged in to the system users and various information # W -: $: -Up13:08, 3Users, load average:0.00,0.00,0.00USER TTY from [email protected] IDLE jcpu PCPU whatroot tty1-00:38 8:25m 22.57s 0.16s-bashroot pts/0 10.0.2.29 05:22 1:14m 0.06s 0.06s-bashroot pts/1 10.0.2.29 05:26 0.00s 0.22s 0.09s w# W.H.O.Root Tty1 .- ,- Geneva xx: -Root pts/0-08-02 05:22 (10.0.2.29)Root pts/1-08-02 05:26 (10.0.2.29)
view currently logged on user #  WhoAmI Root

Lastlog command

View User Last Login time # lastlog user name           port     from             last login time root             pts/1    10.0.  2.29        28 Month  2: £º                                        * * Never logged in * *daemon                                     * * Never logged in * *





[User management]--several commands for user function

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.