LinuxCommandLibrary

w

Show logged-in users and their activity

TLDR

Display information about all users who are currently logged in

$ w
copy

Display information about a specific user
$ w [username]
copy

Display logged-in user information without a header
$ w [[-h|--no-header]]
copy

Display information without including the login, JCPU, and PCPU columns
$ w [[-s|--short]]
copy

SYNOPSIS

w [options] [user]

PARAMETERS

-h
    Don't print header

-u
    Ignore username while calculating current process

-s
    Short format

-f
    Toggle FROM field

-i
    Show IP addresses

DESCRIPTION

w displays information about the users currently on the machine and their processes. The header shows the current time, how long the system has been running, how many users are currently logged on, and the system load averages.

CAVEATS

Shows terminal sessions only. FROM may be truncated.

SEE ALSO

who(1), uptime(1), top(1)

Copied to clipboard