Display the information of users currently logged into the system
w command is used to display the list of users who have logged in to the system and display the instructions being executed by the user. Execute this command to know who are the users currently logged into the system and what programs they are executing. Executing the w command alone will display all users. You can also specify a user name to display only the relevant information of a certain user.
w(option)(parameter)
-h, --no-header do not print header information;
-u, --no-current Ignore username when displaying current process and cpu time;
-s, --short Use short output format;
-f, --from Show where the user logged in from;
-o, --old-style old-style output
-i, --ip-addr Show IP address instead of hostname (if possible)
--help show this help and exit
-V, --version Display version information.
User: Display only specified users.
w
20:39:37 up 136 days, 3:58, 1 user, load average: 0.00, 0.00, 0.00
USER TTY FROM login@ IDLE JCPU PCPU WHAT
root pts/0 222.94.97.122 20:39 1.00s 0.00s 0.00s w