Very often you may need to check users logged in Linux or get total number of users logged in. This is a common requirement for Linux system administrators. In this article, we will look at how to find users currently logged in Linux.
How to Find Users Currently Logged in Linux
Generally, administrators use who command to find out currently logged in users. Here is an example.
$ who ubuntu pts/0 2021-06-26 05:22 (223.229.210.84)
In the above command, the first column is username, and the last column is datetime of login, along with IP address. You may also use who -a command for more detailed information.
$ who -a
system boot 2021-06-25 10:13 run-level 5 2021-06-25 10:13
LOGIN ttyS0 2021-06-25 10:13 930 id=tyS0
LOGIN tty1 2021-06-25 10:13 931 id=tty1
ubuntu + pts/0 2021-06-26 05:22 . 8976 (223.229.210.84)
In this article, we have looked at how to find out users logged in.
Also read:
How to Check Uptime of Service in Linux
How to Resize Partition in Ubuntu
How to Update Key in Python Dictionary
How to Search Item in List of Python Dictionaries
How to Remove Multiple Items from List in Python
Related posts:
Sreeram has more than 10 years of experience in web development, Python, Linux, SQL and database programming.