CentOS如何强行踢掉某登录用户

Linux是一个多用户操作系统,用户可以在不同的地方链接上Linux服务器。

在系统中我们可以用w或者who来查看用户:

[root@linuxidc ~]# who
root pts/0 2019-04-17 20:45 (58.63.138.162)
root pts/1 2019-05-5 22:24 (118.186.197.221)


[root@linuxidc ~]# w
22:33:29 up 4 days, 8:05, 2 users, load average: 1.58, 1.36, 1.47
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 58.63.138.162 20:45 0.00s 0.03s 0.00s w
root pts/1 118.186.197.221 22:24 4:40 0.02s 0.02s -bash


看看那个是自己登录的用户:

[root@linuxidc ~]# who am i
root pts/0 2019-04-17 20:45 (58.63.138.162)


接下来使用 pkill 踢掉用户 pts/1:

[root@linuxidc ~]# pkill -kill -t pts/1


接着用w或者who查看:

[root@linuxidc ~]# w
22:40:43 up 4 days, 8:12, 1 user, load average: 1.58, 1.36, 1.40
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 58.63.138.162 20:45 0.00s 0.03s 0.00s w


已经没有 pts/1 了,大功告成。

原文链接:,转发请注明来源!

发表评论

  • 35 Responses to “CentOS如何强行踢掉某登录用户”
    • Iowa Fake driver's license

      please visit the web-sites we stick to, like this one, as it represents our picks in the web

      回复
    • BUY CHEAP XANAX BARS

      the time to read or go to the content or web pages we have linked to beneath the

      回复
    • مزاداتي

      Here is a great Weblog You might Come across Intriguing that we Encourage You

      回复
    • buy cbd|cbd oil

      Sites of interest we've a link to

      回复
    • buy cbd oil

      very handful of sites that happen to become in depth beneath, from our point of view are undoubtedly effectively really worth checking out

      回复
    • 코인카지노

      Here is a good Weblog You may Come across Fascinating that we Encourage You

      回复
    • 메리트카지노

      just beneath, are several entirely not associated web-sites to ours, having said that, they're surely worth going over

      回复
    • 샌즈카지노

      check below, are some totally unrelated internet sites to ours, nonetheless, they may be most trustworthy sources that we use

      回复
    • working visa

      check beneath, are some completely unrelated websites to ours, nevertheless, they're most trustworthy sources that we use

      回复
    • white maeng da kratom

      please go to the web sites we follow, including this one, because it represents our picks from the web

      回复
    • green maeng da kratom
      回复
    • best p spot massager

      please stop by the internet sites we adhere to, such as this one particular, as it represents our picks in the web

      回复
    • best cbd gummies

      the time to study or go to the content material or websites we've linked to below the

      回复
    • best cbd oil for dogs

      although internet websites we backlink to beneath are considerably not associated to ours, we really feel they may be really really worth a go through, so possess a look

      回复
    • what would happen if a girl took viagra ncugjc

      canadapharmacyonline.com <a href="http://edpharmacystore.com/">that guy</a> buy cialis from us pharmacy
      <a href=http://edpharmacystore.com/>check</a>

      回复
    • best cbd gummies

      just beneath, are various completely not related web sites to ours, even so, they are certainly really worth going over

      回复
    • cbd oil

      Wonderful story, reckoned we could combine a handful of unrelated data, nonetheless really worth taking a look, whoa did one understand about Mid East has got a lot more problerms as well

      回复
    • voyage en cargo

      Sites of interest we have a link to

      回复
    • buy viagra online scqxaw

      highest rated canadian pharmacies <a href="http://edpharmacystore.com/">Go Here</a> cialis usa pharmacy
      <a href=http://edpharmacystore.com/>Read Full Article</a>

      回复
    • anaimmi

      Here are a few of the sites we suggest for our visitors

      回复
    • generic viagra pills nsswda

      cialis canadian pharmacy's <a href="http://edpharmacystore.com/">talking to</a> legitimate online pharmacies india
      <a href=http://edpharmacystore.com/>check over here</a>

      回复
    • 코인카지노

      here are some hyperlinks to web sites that we link to since we believe they may be really worth visiting

      回复
    • 메리트카지노

      just beneath, are many totally not associated web-sites to ours, nevertheless, they are certainly worth going over

      回复
    • 샌즈카지노

      we came across a cool internet site that you just could possibly love. Take a search should you want

      回复
    • singapore loan broker

      very few web-sites that occur to be detailed beneath, from our point of view are undoubtedly properly worth checking out

      回复
    • CharlesHob

      tinder dating app , tinder date
      <a href=http://tinderdatingsiteus.com/?>tinder date </a>

      回复
    • Google
      回复
    • best canadian online pharmacy reviews pcddxa

      viagra from canada pharmacy <a href=http://www.canada1drugstore.com/tadalafil/>canadian pharmacy-viagra</a> purchase viagra
      <a href="http://www.canada1drugstore.com/tadalafil/">free samples of viagra</a> canadian viagra

      回复
    • how much does cialis cost bbgxwq

      purchase viagra <a href=http://www.canada1drugstore.com/tadalafil/>natural alternatives to viagra</a> viagra patent expiration date
      <a href="http://www.canada1drugstore.com/tadalafil/">cialis best price</a> adhp

      回复
    • Tinder dating site

      what is tinder , tinder app
      <a href=http://tinderdatingsiteus.com/?>tinder dating app </a>

      回复
    • cheap viagra pills yfiaax

      buying cialis canada <a href=http://www.canada1drugstore.com/tadalafil/>canadian pharmacies generic drugs online</a> generic viagra from india
      <a href="http://www.canada1drugstore.com/tadalafil/">buy viagra usa</a> generic viagra canada price

      回复
    • tinder dating

      tider , browse tinder for free

      回复
    • cialis online no prescription

      cialis 5mg daily price Ovekly https://biracialism.com/ - Cialis DICIVE Doxycycline Where To Purchase Oppone <a href=https://biracialism.com/#>Cialis</a> immazy buy vardenafil levitra

      回复