We have a multi user linux system. We have different type of users. We want to know what the other users doing.
Linux operating systems like Ubuntu, Fedora, CentOS, Debian have all command w which shows terminal connection details.
Using w Command
We can list fast information about remote connections and their issued commands currently.
11:28:45 up 1 day, 4:09, 2 users, load average: 0.00, 0.01, 0.02
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/ gateway 08:50 5.00s 0.03s 0.00s tmux
ismail pts/3 gateway 11:28 13.00s 0.00s 0.00s watch ls -l
We can also use ps command to list related user processes
$ps u -u ismail
- ps will list processes
- u will make the listing user friendly
- -u ismail specifies the user we want to watch