• OS + Centos 7 user kick off


    s

    12.当运行在多用户模式下时,用Ctrl+ALT+F*可以切换多少虚拟用户终端()
    A.3 B.6 C.1 D.12
    答案 Ctrl+Alt+F1、、、F6

    linux下如何踢掉其他用户

    https://www.cnblogs.com/fbwfbi/archive/2013/05/06/3063331.html

    查看机器中登陆的用户

    [root@chengest~]# w

    16:29:02 up 2 days, 2:35, 5 users, load average: 0.03, 0.05, 0.01

    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT

    root pts/1 :0.0 Tue15 2days 1:44 0.04s -bash

    root pts/2 :0.0 Tue15 46:42m 0.05s 0.05s bash

    root pts/3 :0.0 Tue15 2days 0.02s 0.02s bash

    root pts/4 172.20.52.114 14:17 58:48 0.16s 0.03s sqlplus

    root pts/5 172.20.52.114 15:31 0.00s 0.03s 0.00s w

    我把pts/1踢掉(只有root才能去踢掉用户)

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

    [root@chengest ~]# pkill -kill -t pts/2

    [root@chengest ~]# pkill -kill -t pts/3

    查看是不是踢掉

    [root@chengest ~]# w

    16:34:16 up 2 days, 2:40, 2 users, load average: 0.00, 0.05, 0.02

    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT

    root pts/4 172.20.52.114 14:17 1:04m 0.16s 0.03s sqlplus

    root pts/5 172.20.52.114 15:31 0.00s 0.03s 0.00s w

    root可以踢掉其他用户包括自己

    案例2

    [root@centos8 ~]# w
    16:06:35 up 37 min, 6 users, load average: 0.00, 0.08, 0.07
    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
    root pts/0 10.48.69.80 15:34 2.00s 0.04s 0.00s w
    test tty2 tty2 16:00 37:41 7.37s 0.01s /usr/libexec/gsd-disk-utility-notify
    jbossuse tty3 - 16:01 5:12 0.02s 0.02s -bash
    test tty4 - 16:02 3:54 0.02s 0.02s -bash
    test tty5 - 16:02 3:46 0.02s 0.02s -bash
    test tty6 - 16:02 3:30 0.02s 0.02s -bash

    剔除桌面登陆用户

    [root@centos8 ~]# pkill -kill -t tty2

    [root@centos8 ~]# pkill -kill -t tty3

    [root@centos8 ~]# pkill -kill -t tty4

    [root@centos8 ~]# pkill -kill -t tty5

    [root@centos8 ~]# pkill -kill -t tty6

    查看剔除用户结果

    [root@centos8 ~]# w

     16:15:19 up 46 min,  2 users,  load average: 0.23, 0.06, 0.04

    USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT

    root     pts/0    10.48.69.80      15:34    1.00s  0.04s  0.00s w

    end

    [root@centos8 ~]# pkill -kill -t tty3

  • 相关阅读:
    ENode 1.0
    ENode 1.0
    ENode 1.0
    canvas转图片
    Canvas API
    微信 js api[转]
    Dicom格式文件解析器[转]
    跟我学AngularJS:全局变量设置之value vs constant vs rootscope vs 服务[转]
    angularJS 事件广播与接收[转]
    RequireJs
  • 原文地址:https://www.cnblogs.com/lindows/p/14722444.html
Copyright © 2020-2023  润新知