Linux logoff other logged-in user or logoff login accidentally disconnected user

Source: Internet
Author: User

Often in the operation of Linux, occasionally break the network or in the Intelligent multi-line environment to operate the server, often be disconnected, but the user login process is in, and did not exit.

Simple way to implement a logged in user logoff operation

The code is as follows Copy Code

[Root@kiccleaf ~]# who
Root PTS/1 2014-06-04 12:07 (27.115.*.*)
Root PTS/2 2014-06-04 13:31 (58.247.*.*)
Root PTS/3 2014-06-04 13:42 (58.246.*.*)
Root PTS/4 2014-06-04 13:56 (140.207.*.*)
Root PTS/5 2014-06-04 14:01 (140.207.*.*)

#结束掉一些登录的用户

[Root@kiccleaf ~]# pkill-kill-t PTS/1

Kill and Log off the user

  code is as follows copy code

#skill- Kill-u Xindongfang

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.