which
which - shows the full path of (shell) commands.
which [options] [--] programname [...]
示例:
[root@centos7 ~]# which ls
alias ls='ls --color=auto'
/usr/bin/ls
whereis
whereis - locate the binary, source, and manual page files for a command
whereis [options] [-BMS directory... -f] name...
示例:
[root@centos7 ~]# whereis ls
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz /usr/share/man/man1p/ls.1p.gz
who
who - show who is logged on
who [OPTION]... [ FILE | ARG1 ARG2 ]
示例:
[root@centos7 ~]# who
yang :0 2019-12-08 22:41 (:0)
yang pts/0 2019-12-15 11:00 (:0)
root pts/1 2019-12-15 11:01 (192.168.0.103)
w
w - Show who is logged on and what they are doing.
w [options] user [...]
[root@centos7 ~]# w
11:29:13 up 5:29, 3 users, load average: 0.06, 0.03, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
yang :0 :0 08Dec19 ?xdm? 4:51 0.48s /usr/libexec/gnome-session-binary --session gnome-classic
yang pts/0 :0 11:00 28:41 0.05s 0.05s bash
root pts/1 192.168.0.103 11:01 1.00s 0.27s 0.03s w