Sometimes you just want to find out the bugged logged into your system ;), It might be your co-worker or friends. To find out who is logged in including the time they logged in, you can use the who
command.
The who command displays information about currently logged in users. By default, this includes the login name, tty name, date, and time of login, and remote hostname if it is not local.
Enter who
, and you should see a similar output:
user1 ttypU July 24 08:24 . (192.168.7.80)
friend2 ttypM July 24 11:30 . (192.168.5.11)
........
To check the user that last login to the system, you can use lastlog
pascal@blog:~$ lastlog
Username Port From Latest
root **Never logged in**
daemon **Never logged in**
bin **Never logged in**
sys **Never logged in**
sync **Never logged in**
games **Never logged in**
man **Never logged in**
lp **Never logged in**
mail **Never logged in**
news **Never logged in**
uucp **Never logged in**
proxy **Never logged in**
www-data **Never logged in**
backup **Never logged in**
list **Never logged in**
irc **Never logged in**
gnats **Never logged in**
nobody **Never logged in**
systemd-network **Never logged in**
systemd-resolve **Never logged in**
syslog **Never logged in**
messagebus **Never logged in**
_apt **Never logged in**
lxd **Never logged in**
uuidd **Never logged in**
dnsmasq **Never logged in**
landscape **Never logged in**
pollinate **Never logged in**
sshd **Never logged in**
devsrealm pts/0 192.168.43.205 Sat Jul 25 04:39:18 +0000 2020
vboxadd **Never logged in**
faruq tty1 Thu Jan 30 18:08:02 +0000 2020
thisisme **Never logged in**
dumm **Never logged in**
james **Never logged in**
mysql **Never logged in**
pascal@blog:~$
Enjoy