How to grep all the logged in users from a user list in Linux (Ubuntu) ?
So far I got to:
cat /etc/passwd | grep "/home" | cut -d: -f1
migrated from stackoverflow.com May 12 '13 at 12:37
This question came from our site for professional and enthusiast programmers.
as commented above w or who shows you who is logged in..
You could also look at historical/current data looking at lastlog
and lastb for last bad logins.
Username: xxx is and is logged into pts/0
Username: xxx is and is logged into pts/5