Linux: View what users are / were logged on a system

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

There are several simple commands to show what users are logged a Linux systems. Logo_linux_Pinguin

The following commands are standard in all distributions (as of date)

w

who

who –a

who and users show who are currently logged on. You can also use last:

last

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Another possibility is to get the users-information from the systems logs:

grep sshd /var/log/messages

grep-out Failed login attempts 

grep sshd /var/log/messages | grep -i "Failed" | awk ‘{print $NF}’ | sort|uniq -c|sort -n

see access thru httpd

cat /var/log/httpd/access_log

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.