amazon media file explorer download upload index folder image licenses menu widget Play Pause profile-settings more dots-two-horizontal dots-two-vertical more-vertical pending google-plus hangouts facebook instagram whatsapp spotify telegram twitter vine renren rss youtube twitch vimeo flickr dribble behance deviantart 500px steam github soundcloud skype reddit linkedin lastfm delicious stackoverflow pinterest xing flattr foursquare yelp World

How To Find Out Who Is Logged In On a GNU/Linux Server

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 whocommand.

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

Related Post(s)

  • sed (Stream Editor) In Bash Scripting

    Another powerful filter in GNU/Linux is sed (stream editor), which is a program for performing basic editing tasks on the output of another program or on a file. sed or stream editor can be used to p

  • awk In Bash Scripting

    Up until now, we have covered a couple of text processing, from sed to grep to sort, and now we have the big daddy, which is awk. awk (which stands for Aho, Weinberger, and Kernighan - its creators)

  • (Bash Script) Automate Multiple Classicpress & Wordpress Installation + [Caching and SSL]

    If you are tired of using control panels (I am because they are mostly not secure, and most comes loaded with bundles of useless stacks), and want to do everything on the server level, I wrote a menu

  • Functions in Bash

    Functions are modular building blocks for creating powerful and modular scripts, using function makes it easy to isolate a code since it would be in a single building block, which would be isolated f

  • grep (Regular Expression) In Bash Scripting

    We recently discussed filters in bash scripting, in this guide we would look more into the practical usage of using a filter program, and an example of such a program is grep. grep, in its simplest f

  • Sort in Bash Scripting

    We recently just looked at grep in bash scripting, and another commonly used program in bash scripting is the program called sort. Sort is a simple filter that is used to sort lines of text from its