Find out which users are logged in

27 Nov, 2009

Who command
Question: How do I find out which users are logged in to my Linux server?

Answer: To find out who is logged on to your server, you can run a very simple command:

who

You will need to login to your server via SSH order to run this command.

This will tell you the person’s username as well as the date and time they logged in. Who will also tell you a few other things. “who -b” will tell you the last time the system was booted. Enter “who -q” to find out the names of the logged in users and then a summary count of total users.

If you need to make sure you are logged in as a particular user, you can also type

whoami

This will tell you your own username.

This command is very useful if you suspect there are unauthorized users on your server or if you suspect someone of hacking into an authorized user’s account when you know they are not logged in. Therefore, it can be used for general information and for security purposes. For more information about the “who” command, type “man who” from the command line.

Share
Categories : VPS & Dedicated, Web Hosting , , , , , ,
Tag: , , , , , ,

Comments are closed.