Linux命令——w、who、whoami、lastlog、last
2024-09-05 04:03:52
参考:Linux w Command Tutorial for Beginners (5 Examples)
Linux who Command Tutorial for Beginners (8 Examples)
Difference between who and whoami commands
w
Show who is logged on and what they are doing.
w无参数时的输出就已经包含足够多信息,参数只是限制输出某些信息。
w user_name 显示具体某人的信息
-h:Don't print the header.
-s(小写):Use the short format. Don't print the login time, JCPU or PCPU times.
-f:Toggle printing the from (remote hostname) field
who
show who is logged on
-b:time of last system boot
-d:print dead processes
-p(小写):print active processes spawned by init
-q:all login names and number of users logged on
-r:print current runlevel
参数 | 说明 |
---|---|
-a |
打印能打印的全部 |
-d |
打印死掉的进程 |
-m |
同am i ,mom likes |
-q |
打印当前登录用户数及用户名 |
-u |
打印当前登录用户登录信息 |
-r |
打印运行等级 |
whoami
这个命令没有参数,见名知意
直接执行whoami
也可以分开写
who am i
最新文章
- DataTable to Excel(使用NPOI、EPPlus将数据表中的数据读取到excel格式内存中)
- 【转】mysql忘记密码(未初始化)
- 对c语言中malloc和free函数的理解
- 用 C# 实现一个简单的 Rest Service 供外部调用
- c#生成缩略图
- 2013年度Python Git工具
- GLSL实现Simple Displace Mapping 水仿真流体绘制 【转】
- Layout Resource官方教程(1)简介
- linux运维安全工具集合[持续更新中..]
- 本地yum源
- SpringMVC——使用RequestDispatcher.include()和HttpServletResponseWrapper动态获取jsp输出内容
- 优秀设计师应当知道的20大UI设计原则
- 【php】php位运算及其高级应用
- shell脚本----周期压缩备份日志文件
- 【转】Python之函数与变量
- windows 与 Linux SOCKET通讯
- bzoj3631 松鼠的新家
- JDK1.9怎么配置环境变量
- git 远程仓 和 本地仓 记录
- php简单工厂模式