Why there are two users showing in uptime command results?
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Hypnotic Puzzle3
--
Chapters
00:00 Why There Are Two Users Showing In Uptime Command Results?
00:43 Accepted Answer Score 63
01:40 Answer 2 Score 2
02:07 Answer 3 Score 1
02:20 Thank you
--
Full question
https://superuser.com/questions/148423/w...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#macos #mac #users #uptime
#avk47
ACCEPTED ANSWER
Score 63
Try the w
command. On my system I have the following:
# w
02:16:53 up 6:48, 2 users, load average: 0.50, 0.42, 0.52
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
pcm tty7 :0 19:28 6:48m 16:07 0.17s gnome-session
pcm pts/0 :0.0 01:51 0.00s 0.36s 0.76s gnome-terminal
# uptime
02:16:56 up 6:48, 2 users, load average: 0.50, 0.42, 0.52
tty7 is your desktop login, pts/0 is a pseudo terminal ... probably what was used to type uptime
in.
Why it lists that there are two users?
Because it shows every logged in session. A single user can have multiple active sessions at any one time.
is it normal?
100% normal ... A-OK
and who is the other user, is it the root user or what?
The other user is yourself. You have multiple sessions running. You can see in your output from your question, that the user name is the same for both sessions.
ANSWER 2
Score 2
I have just figured it out! I don't know whether it'll work for you or not. But I did the following steps:
- Pressed ctrl+alt+f1 and got terminal emulator on my linux mint 20.1 (Cinnamon)
- Typed exit and hit enter
- Opened Terminal; typed uptime and hit enter Now, it was showing me 1 user instead of 2. Hope it helps.
ANSWER 3
Score 1
Each Terminal window or tab adds an additional user to what uptime reports. So, I'm guessing that one of those users is for your current Terminal session, and the other is for your macOS.