1

w command displays useful information about where users come from and what are they doing.

A example of its output is:

 ~ $ w -V
 procps version 3.2.8
 ~ $ w
 13:53:14 up 164 days,  3:12,  5 users,  load average: 0.00, 0.01, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1     -                06Aug13 56:38   0.11s  0.11s -bash
amp      pts/0    a89-153-189-213. 11:30   17.00s  0.13s  0.13s -bash
rafael   pts/4    gwec.di.uminho.p 11:59    0.00s  0.80s  0.00s w

But this output truncates the hostname in the "FROM" field, is there a way yo discover the entire hostname/IP address?

RSFalcon7
  • 4,367
  • 6
  • 30
  • 56

1 Answers1

1

The command who prints the entire hostname.

 ~ $ who --version
who (GNU coreutils) 8.4
...
 ~ $ who
root     tty1         2013-08-06 10:01
amp      pts/0        2013-10-21 11:30 (entire.hostname)
rafael   pts/4        2013-10-21 11:59 (entire.hostname)
RSFalcon7
  • 4,367
  • 6
  • 30
  • 56