Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [w]

The tag has no usage guidance.

9
votes
1answer
339 views

Different outputs for `w`, `who`, `whoami` and `id`

In command line platforms online, like for instance the one on Codecademy, when I run for cmd in w who whoami id do echo $cmd $cmd echo ========================= echo " " ...
0
votes
3answers
56 views

Seeing user two times

Consider I have created a user 'test' during Installation which I use to login to my system. My root user is 'root'. I further open two terminal sessions for each of the users respectively. Now the ...
0
votes
2answers
255 views

w command doesn't show all pseudo-terminal sessions

If I open terminal and execute w command then it will show: user tty7 :0 12:04 39:56 36.87s 0.06s /sbin/upstart - Now if open terminator or xterm and execute w command then ...
-3
votes
1answer
231 views

What does a w | cut -d “ ” -f 1 - with a grep and sort should do?

This is the code I desire to decipher: w | cut -d " " -f 1 - | grep -v USER | sort -u
4
votes
3answers
523 views

How to see what a user is doing in their ssh session

I logged into a server as root and did w, this let me see that a user was editing a file. someuser pts/5 10.117.0.53 14:03 3:25 1.20s 1.14s vi somefile.py Then I disconnected, and ...
4
votes
6answers
1k views

How to see which file a user is editing in vi

If I do a w, I can see that a user is editing a certain file in vi. However there are several files with the same name in different directories. How do I see which of these files is the one that the ...
0
votes
1answer
22 views

who and w report my user ten times..but I have only four pts open

The command w said 02:50:35 up 20:54, 10 users, load average: 1,07, 1,29, 1,41 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT myuser :0 - lun05 ?xdm? 1:...
1
vote
1answer
103 views

Inconsistent behavior of `w` command concerning `WHAT` column

I run w command on two machines. They both have exactly the same system installed: Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-87-generic x86_64). I am logged in as hans on both machines through SSH. machine ...
0
votes
1answer
609 views

Commands I can use to determine who is logged in on a specific terminal?

I am in a Linux/Unix Systems class and I need to determine commands I can use to determine who is logged in on a specific terminal? I know there is the w, who, or finger commands. Do any of these ...
6
votes
2answers
3k views

who shows (unknown) user logged-in: what's going on?

In a RHEL 7.3 server, I was trying to find logged-in users. I ran w and it told me there were two users, but it only showed me the info of one (myself); then I ran who, which displayed the other user ...
7
votes
2answers
1k views

What does “w” do with urandom?

> strace w 2>&1 | grep urandom read(4, "/usr/bin/grep\0urandom\0", 2047) = 22 > Why does "w" need urandom? How to avoid this? UPDATE: > strace w 2>&1 | awk '/urandom/' read(...
8
votes
1answer
1k views

How does the `w` command know the idle time and the running command?

The w command shows a bunch of information about who's logged in what they are doing. Example from Wikipedia: $ w 11:12am up 608 day(s), 19:56, 6 users, load average: 0.36, 0.36, 0.37 User ...
6
votes
3answers
1k views

Can not evoke watch command with non-integer time option

I want to start the w command periodically, according to man watch the smallest possible time interval is 0.1. I tried: watch -n1 w (works) watch -n1.5 w (does not work) watch -n0.1 w ...
1
vote
1answer
90 views

How do I keep running a command in the same area of the console window? (“w”)

I'm looking at the output of w: ehryk@ArchHP ~> sudo w 14:12:37 up 4:08, 4 users, ...
0
votes
1answer
58 views

w command: same output with(out) -u option?

According to the manpage for w: -u   Ignores the username while figuring out the current process and cpu times. To demonstrate this, do a "su" and do a "w" and a "w -u". I've tried this with(...
1
vote
3answers
478 views

Wrong number of logged in users using “w”

There was a temporary network glitch and all user terminal ssh sessions were broken. Upon logging in to the CentOS server again and running the "w" command lists a higher number of users logged in ...
0
votes
1answer
2k views

How does Linux system synchronize wtmp and /var/run/utmp?

Linux system normally stores current user login information in /var/run/utmp, and stores historical information in /var/log/wtmp. So, how does it synchronize information between them, When a login ...
1
vote
1answer
49 views

How to check where users come from? [duplicate]

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, ...