Show who is logged in and what is he doing.

The w tool is similar to who, but it displays more detail. It outputs a header line that contains information about the current system status, including the current time, the amount of time the system has been up and running, and the number of users on the system.

It then outputs a list of users currently logged in to the system, giving eight columns of information for each. These columns include username, terminal location, X session (if any), the time of login, the amount of time the user has been idle, and what command the user is running. (It also gives two columns showing the amount of time the system's CPU has spent on all of theuser's current jobs ("JCPU") and foreground process ("PCPU");

· To see who is currently logged in and what they are doing, type:

$ w RET
5:27pm up 17:53, 4 users, load average: 0.12, 0.06, 0.01
murky tty1 Oct 20 20:09 17:22m 0.32s 0.32s −bash
dave tty2 14:37 13.00s 2:35 0.07s less foo
kurt tty3 15:04 1:00m 0.41s 0.09s startx
kurt ttyp1 :0.0 15:04 0:00s 21.65s 20.96s emacs

In this example, the command's output shows that the current system time is 5:27 p.m., the system has been up for 17 hours and 53 minutes, and there are four users currently logged in: murky is logged in at tty1, has been idle for 17 hours and 22 minutes, and is at a bash shell prompt; dave is logged in at tty2, has been idle for 13 seconds, and is using less to peruse a file called `foo' (see section Perusing Text); and kurt is logged in at two terminals−−−tty3 and ttyp1, which is an X session. He ran the startx command on tty3 to start his X session, and within his X session, he is currently using Emacs.

Posted on: 15/12/2009

If you want to leave a comment please Login or Register
New Debian stable release......
OpenSuSE 11.3......
The Origins of Linux......
Use fdisk to Create a Swap Partition......
Checking In a File Revision......