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