Step By Step Guide to Run W Commands on Ubuntu 20.04 LTS

W is a linux basic command tool. It helps to display the information about currently logged in users & what they are currently doing. It gives the information about the system resources such as user information, current time, and the system load average. We can easily get the report on a login name, tty name, login time ,JCPU,& remote host.

There are few syntax with examples of w commands in ubuntu:

Step 1: Update the System.

apt-get update

Step 2: W syntax & Examples:

w [options] [username]

  • Run w command:

w

  • Here is the command output.

  • To list all the current users.

w username
w ubuntu

  • Here is the command output.

  • Don’t display the header.

w -h

  • Here is the command output.

  • To list current process and cpu times..

w -u

  • Here is the command output.

  • Don’t display the login time, JCPU or PCPU times.To use the short style output.

w -s

  • Here is the command output.

  • To toggle printing the from (remote hostname) field.

w -f

  • Here is the command output.

  • To check w version.

w -V

  • Here is the command output.

  • To display the IP Address.

w -i

  • Here is the command output.

  • To display the old style output.

w -o

  • Here is the command output.

  • To list all the available option in w.

w -help

  • Here is the command output.

Leave a Reply