免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
1234下一页
最近访问板块 发新帖
查看: 37439 | 回复: 35
打印 上一主题 下一主题

如何注销其他已登录的用户? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-04 11:37 |只看该作者 |正序浏览
例如,以root身份注销一个已登录的普通用户?

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-06-12 22:20:00
36 [报告]
发表于 2013-08-15 17:53 |只看该作者
果断kill掉

论坛徽章:
0
35 [报告]
发表于 2013-08-12 10:28 |只看该作者
  1. pkill -kill -t pts/1
复制代码

论坛徽章:
224
2022北京冬奥会纪念版徽章
日期:2015-08-10 16:30:32操作系统版块每日发帖之星
日期:2016-02-18 06:20:00操作系统版块每日发帖之星
日期:2016-03-01 06:20:00操作系统版块每日发帖之星
日期:2016-03-02 06:20:0015-16赛季CBA联赛之上海
日期:2019-09-20 12:29:3219周年集字徽章-周
日期:2019-10-01 20:47:4815-16赛季CBA联赛之八一
日期:2020-10-23 18:30:5320周年集字徽章-20	
日期:2020-10-28 14:14:2615-16赛季CBA联赛之广夏
日期:2023-02-25 16:26:26CU十四周年纪念徽章
日期:2023-04-13 12:23:1015-16赛季CBA联赛之四川
日期:2023-07-25 16:53:45操作系统版块每日发帖之星
日期:2016-05-10 19:22:58
34 [报告]
发表于 2012-07-23 15:38 |只看该作者
fuser
No process specification given
Usage: fuser [-fMuv] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME...
       fuser -l
       fuser -V
Show which processes use the named files, sockets, or filesystems.

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
33 [报告]
发表于 2012-07-23 15:04 |只看该作者
  1. NAME
  2.      fuser — list IDs of all processes that have one or more files open

  3. SYNOPSIS
  4.      fuser [-cfkmu] [-M core] [-N system] [-s signal] [file ...]

  5. DESCRIPTION
  6.      The fuser utility writes to stdout the PIDs of processes that have one or
  7.      more named files open.  For block and character special devices, all pro‐
  8.      cesses using files on that device are listed.  A file is considered open
  9.      by a process if it was explicitly opened, is the working directory, root
  10.      directory, jail root directory, active executable text, kernel trace file
  11.      or the controlling terminal of the process.  If -m option is specified,
  12.      the fuser utility will also look through mmapped files.

  13.      The following options are available:

  14.      -c      Treat files as mount point and report on any files open in the
  15.              file system.

  16.      -f      The report must be only for named files.

  17.      -k      Send signal to reported processes (SIGKILL by default).

  18.      -m      Search through mmapped files too.

  19.      -u      Write the user name associated with each process to stderr.

  20.      -M      Extract values associated with the name list from the specified
  21.              core instead of the default /dev/kmem.

  22.      -N      Extract the name list from the specified system instead of the
  23.              default, which is the kernel image the system has booted from.

  24.      -s      Use given signal name instead of default SIGKILL.
复制代码

论坛徽章:
0
32 [报告]
发表于 2012-07-23 14:59 |只看该作者
重启即可呵呵,不过这是迫不得已的方法

论坛徽章:
20
CU大牛徽章
日期:2013-03-13 15:29:072015亚冠之阿尔希拉尔
日期:2015-09-12 09:33:562015年亚冠纪念徽章
日期:2015-09-22 17:12:202015亚冠之本尤德科
日期:2015-10-29 16:18:18神斗士
日期:2015-11-23 13:37:23青铜圣斗士
日期:2015-12-07 10:14:28平安夜徽章
日期:2015-12-26 00:06:3015-16赛季CBA联赛之佛山
日期:2016-01-18 08:59:06shanzhi
日期:2016-06-17 17:59:3115-16赛季CBA联赛之同曦
日期:2016-11-03 14:43:552015七夕节徽章
日期:2015-08-21 11:06:17丑牛
日期:2014-12-30 16:06:17
31 [报告]
发表于 2010-11-15 19:48 |只看该作者
ps 查看进程
kill 进程

论坛徽章:
0
30 [报告]
发表于 2010-11-15 17:10 |只看该作者
kill进程

论坛徽章:
0
29 [报告]
发表于 2010-11-15 15:27 |只看该作者
一直都是kill进程的

论坛徽章:
0
28 [报告]
发表于 2010-11-15 14:58 |只看该作者
刚刚好需要,非常感谢
  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP