Linux W who lastlog command example

Source: Internet
Author: User

W who lastlog command example w view current logged in user and current operation
[[email protected] ~]# w 22:52:39 up 133 days, 16:47,  8 users,  load average: 0.77, 0.31, 0.32USER     TTY      FROM              [email protected]   IDLE   JCPU   PCPU WHATroot     pts/0    remotepc.cedarhd 22:08   32:22   0.07s  0.04s vi applicationContext.xmlroot     pts/2    10.3.244.3       22:47    0.00s  0.02s  0.00s wroot     tty1     :0               28Apr18 133days  1:17   1:17  /usr/bin/Xorg :0 -br -verbose -audit 4 -auth /var/run/gdm/auroot     pts/1    :0.0             28Apr18 16days  0.06s  0.06s /bin/bashroot     pts/5    remotepc.cedarhd 20:00    7:27   0.15s  0.15s -bashroot     pts/6    remotepc.cedarhd 21:01   60.00s  0.06s  0.06s -bashroot     pts/7    remotepc.cedarhd 21:30   44.00s  1:32   0.02s -bashroot     pts/8    remotepc.cedarhd 21:30    1:21m  0.10s  0.07s tail -500f catalina.out
Who view current logged in user
[[email protected] ~]# whoroot     pts/0        2018-05-14 22:08 (remotepc.cedarhd.com)root     pts/2        2018-05-14 22:47 (10.3.244.3)root     tty1         2018-04-28 15:22 (:0)root     pts/1        2018-04-28 15:22 (:0.0)root     pts/5        2018-05-14 20:00 (remotepc.cedarhd.com)root     pts/6        2018-05-14 21:01 (remotepc.cedarhd.com)root     pts/7        2018-05-14 21:30 (remotepc.cedarhd.com)root     pts/8        2018-05-14 21:30 (remotepc.cedarhd.com)
Ways to kick out PTS/2 users:
[[email protected] ~]# whoroot     pts/0        2018-05-14 22:08 (remotepc.cedarhd.com)root     pts/2        2018-05-14 22:47 (10.3.244.3)root     tty1         2018-04-28 15:22 (:0)root     pts/1        2018-04-28 15:22 (:0.0)root     pts/5        2018-05-14 20:00 (remotepc.cedarhd.com)root     pts/6        2018-05-14 21:01 (remotepc.cedarhd.com)root     pts/7        2018-05-14 21:30 (remotepc.cedarhd.com)root     pts/8        2018-05-14 21:30 (remotepc.cedarhd.com)[[email protected] ~]# pkill -kill -t pts/2
Lastlog View last login time for all users
[[email protected] ~]# lastlogUsername         Port     From             Latestroot             pts/2    10.3.244.3       Mon May 14 22:47:03 +0800 2018bin                                        **Never logged in**daemon                                     **Never logged in**adm                                        **Never logged in**lp                                         **Never logged in**sync                                       **Never logged in**shutdown                                   **Never logged in**halt                                       **Never logged in**mail                                       **Never logged in**uucp                                       **Never logged in**operator                                   **Never logged in**games                                      **Never logged in**

Linux W who lastlog command example

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.