Skip to main content

Posts

Showing posts from February, 2025

How to Check all user logged in Linux server?

We are learning how to get all logged in user name in a Linux server you need administrative privileges to execute commands cover here.    There are many ways to list logged in user on a Linux machine. Here I am covering my three favourite  method for this purpose. All this command run with any fedora based system like Red Head Linux , Centos, Rocky Linux, Amla linux etc. 1. lastlog : you can use list command to know all login user. this command uses file available in /var/log/lastlog. This command read data from the mentioned file and present in a human readable from     You can use grep command to filter output and show only currently logged in user by following command. lastlog | grep -v 'Never' In this example we use grep -v switch to exclude all line containing Never. This way we find all currently logged in user. 2. W command : This is more preferable way to get all logged in user, it uses file mentioned on lastlog command and file situated on /proc...