Questions tagged [w]
Tag for questions concerning the 'w' command, a tool used to display currently logged-in users and their activities.
24 questions
1 vote
0 answers
38 views
Idle time (tty st_atime) not updating when emacs is running
When running GNU emacs in a terminal (in the old-fashioned way, that is, i.e. not in its X windows mode) I've noticed that the w command shows the session as idle, even though emacs is active and ...
0 votes
0 answers
76 views
`w` not working on Buildroot
I'm working remotely on an embedded device running Buildroot. My colleagues are working on this same device, so it's important to know who else is logged in. For a previous project (running on a non-...
0 votes
0 answers
124 views
How can I parse the output of w to collect current user sessions?
I want to parse the output of w so I can collect current user sessions and record them via telegraf. However, it only provides space separated output and I'm not sure how to reliably parse this ...
0 votes
1 answer
161 views
Why don't my wtmp/utmp reset the user count?
On a normal working Linux machine the command w report 2 users(because 2 users are connected) w 19:23:19 up 1:53, 2 users, load average: 0,44, 0,63, 0,81 USER TTY FROM LOGIN@ ...
0 votes
1 answer
1k views
How to hide script from process list in Linux?
I have a script in linux: #!/bin/bash export DISPLAY=:1 value=$(</home/pace/Desktop/BODVersion.txt) cd $value gnome-terminal \ --tab -t "CTCLManager" -e " sh -c 'sleep 1s; ./startapp ...
10 votes
1 answer
3k 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
3 answers
1k 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 ...
2 votes
2 answers
3k 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 it ...
-2 votes
1 answer
6k 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
3 votes
3 answers
6k 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 ...
3 votes
6 answers
6k 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
1 answer
85 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
1 answer
395 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
1 answer
1k 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 ...
7 votes
2 answers
8k 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 ...