Remove online linux Users

Source: Internet
Author: User

1. query online users:

[Plain] view plaincopy
  1. [Root @ leekwen ~] # W
  2. 09: 18: 37up22: 30, 4 users, loadaverage: 0.00, 0.02, 0.00
  3. USERTTYFROMLOGIN @ IDLEJCPUPCPUWHAT
  4. Rootpts/2122.224.121.19409: 0313: 560.01s0.00stail-f/var/lo
  5. Rootpts/4122.224.121.19409: 056: 160.01s0.01s-bash
  6. Rootpts/5122.224.121.19409: 090.00s0.03s0.00sw
  7. Rootpts/3122.224.121.19409: 170.00s0.01s0.01s-bash

2. query the programs run by pts/2 client: [plain] view plaincopy
  1. [Root @ leekwen ~] # Ps-ef | greppts/2
  2. Root89981418009: 03? 00: 00: 00 sshd: root @ pts/2
  3. Root90008998009: 03pts/200:00:00-bash
  4. Root90729000009: 04pts/200: 00: 00tail-f/var/log/messages
  5. Root97029283009: 18pts/500: 00: 00 greppts/2
3. Remove pts/2 client: [plain] view plaincopy
  1. [Root @ leekwen ~] # Killed-99000
  2. [Root @ leekwen ~] # Ps-ef | greppts/2
  3. Root89981418009: 03? 00: 00: 00 sshd: root @ pts/2
  4. Root97639283009: 18pts/500: 00: 00 greppts/2
  5. [Root @ leekwen ~] # Ps-ef | greppts
  6. Root89981418009: 03? 00: 00: 00 sshd: root @ pts/2
  7. Root90881418009: 05? 00: 00: 00 sshd: root @ pts/4
  8. Root90909088009: 05pts/400: 00: 00-bash
  9. Root92811418009: 09? 00: 00: 00 sshd: root @ pts/5
  10. Root92839281009: 09pts/500: 00: 00-bash
  11. Root93851418009: 17? 00: 00: 00 sshd: root @ pts/3
  12. Root957290000009: 17pts/300: 00: 00-bash
  13. Root97879283009: 18pts/500: 00: 00ps-ef
  14. Root97889283009: 18pts/500: 00: 00 greppts

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.