参考: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

最新文章

  1. DataTable to Excel(使用NPOI、EPPlus将数据表中的数据读取到excel格式内存中)
  2. 【转】mysql忘记密码(未初始化)
  3. 对c语言中malloc和free函数的理解
  4. 用 C# 实现一个简单的 Rest Service 供外部调用
  5. c#生成缩略图
  6. 2013年度Python Git工具
  7. GLSL实现Simple Displace Mapping 水仿真流体绘制 【转】
  8. Layout Resource官方教程(1)简介
  9. linux运维安全工具集合[持续更新中..]
  10. 本地yum源
  11. SpringMVC——使用RequestDispatcher.include()和HttpServletResponseWrapper动态获取jsp输出内容
  12. 优秀设计师应当知道的20大UI设计原则
  13. 【php】php位运算及其高级应用
  14. shell脚本----周期压缩备份日志文件
  15. 【转】Python之函数与变量
  16. windows 与 Linux SOCKET通讯
  17. bzoj3631 松鼠的新家
  18. JDK1.9怎么配置环境变量
  19. git 远程仓 和 本地仓 记录
  20. php简单工厂模式

热门文章

  1. for miaomiao
  2. Java使用MyBatis的ScriptRunner执行SQL脚本
  3. galera集群启动异常问题
  4. office word 設置默認的縮放為100%, office word set default Zoom to 100% permanently
  5. 股票PE的应用
  6. 【转载】利用Amazon ECR和ECS部署容器应用
  7. vscode常用插件小结
  8. 最新 百合佳缘java校招面经 (含整理过的面试题大全)
  9. 最新 中手游java校招面经 (含整理过的面试题大全)
  10. RabbitMQ的安装(Windows环境下)