Linux如何注销其他用户呢?首先用who命令或w命令,列出登陆的用户列表,例如:
root pts/1 Dec 10 08:52 (maping)
root pts/2 Dec 10 09:00(wangguo)
root pts/3 Dec 10 09:02(wangguo)
root pts/4 Dec 10 09:15(wangguo)
root pts/5 Dec 10 09:17(wangguo)
root pts/6 Dec 10 09:38(wangguo)
root pts/7 Dec 10 09:20 (maping)
root pts/8 Dec 10 09:22(wangguo)
root pts/9 Dec 10 09:23 (maping)
root pts/10 Dec 10 10:32 (maping)
root pts/11 Dec 10 09:38 (wangguo)
root pts/12 Dec 10 09:42(wangguo)
然后用以下任意一个命令注销掉需要注销的用户。
pkill -kill -t pts/1
skill -KILL -v pts/*