Linux Terminates user sessions

Source: Internet
Author: User
Tags session id terminates pkill

The first step is to use the TTY command to view your session ID, in this case the session ID is 1
[[email protected] ~]# TTY
/dev/pts/1
[Email protected] ~]#

The second step uses the W command to see which sessions the current server has;
[Email protected]:~$ W
10:14:59 up min, 2 users, Load average:0.00, 0.09, 0.27
USER TTY from [email protected] IDLE jcpu PCPU
Dante Pts/1 192.168.1.2 10:14 0.00s 0.54s 0.00s W
Dante pts/0 192.168.1.120 10:10 4:29 0.55s 0.55s-bash
[Email protected]:~$

Step three use the Pkill command to kill the corresponding session ID
[Email protected]:~$ pkill-9-T pts/0
[Email protected]:~$ W
10:17:35 up min, 1 user, load average:0.01, 0.07, 0.23
USER TTY from [email protected] IDLE jcpu PCPU
Dante Pts/1 192.168.1.2 10:14 0.00s 0.58s 0.00s W

Linux terminates user sessions

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.