Display Who is Logged into the System
who displays information about users currently logged into the system. It shows usernames, terminal lines, login times, and remote host information. Essential for system administration, security monitoring, and understanding system usage.
Shows all currently logged-in users with their terminal and login time. Remote connections show IP address in parentheses.
Displays information only about the current terminal session. Useful in scripts to identify the running user.
The -H option adds column headers for clarity. Helpful for documentation and understanding output format.
Shows idle time and process ID. Dot (.) means active within last minute. Format is HH:MM for idle time.
Displays when the system was last booted. Useful for determining uptime and last restart.
Shows current system run level. Run level 5 typically means graphical multi-user mode.
Quick count format showing usernames and total count. Fastest way to see how many users are logged in.
Comprehensive output including boot time, run level, dead processes, and login processes. Most detailed view available.
Filters output to show only users on a specific terminal. Useful for checking specific connection types.
Shows only remote connections by filtering for IP addresses. Important for security auditing and monitoring external access.
-a - All information (boot time, run level, dead processes, etc.)-b - Time of last system boot-d - Dead processes-H - Print column headings-l - Login processes-q - Quick mode (names and count only)-r - Current run level-s - Short format (default)-u - Display idle time and process ID-w - Show user's message status (+, -, ?)w - More detailed than who (shows what users are doing)users - Simple list of logged-in usernameslast - Show login historylastlog - Show most recent login for all usersfinger - User information lookup (if installed)id - Show user and group informationwhoami - Display effective usernamewho or w to monitor for unauthorized logins. Combine with last for historical login analysis.