The UNIX `who` command
While working on a completely different project, I started to ask myself how the who command was working under the hood. In the end, I thought it was a good topic for a blog post. Who is who Let’s start with the basics. the who command allows you to list the users currently logged on the system. For example, on my machine: $ who gauthier tty2 2020-08-30 15:06 (tty2) gauthier pts/1 2020-08-30 15:06 (tmux(1555).%0) gauthier pts/2 2020-08-30 16:41 (tmux(1555).%6) gauthier pts/4 2020-08-30 15:57 (tmux(1555).%3) It tells me that I am logged on the “physical” terminal tty2 and on three pseudo terminals. Indeed my current session of Gnome Shell is running on tty2 and I have 3 tmux windows open. ...