I am logged into Ubuntu server via ssh
and I would like to know if another user is logged in via SSH as well. Is there a command that I can run to accomplish this?
I am logged into Ubuntu server via ssh
and I would like to know if another user is logged in via SSH as well. Is there a command that I can run to accomplish this?
Just type
who
:EDIT
Regarding your bonus question :)
To see login history for users you can use
last -i
. This will show all logins and IP addresses since start of current logfile/var/log/wtmp
.Depending on your logrotate you can show previous logs with
last -f /var/log/wtmp.1
, too.To only show the very last login for each user use
last -i | sort -r | uniq -w 16
who
is good, but simplyw
is better.