Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Running Debian testing. Why do I appear to be logged in twice? This is a recent development. GKRellm used to show 1 users. Searching comes up with two likely looking posts, but it's on stack exchange and there's a cookie dialog that I cannot close so I can't read the posts.
[edit] Actually I was able to scroll line by line and the posts were no help. [/edit]
If I go to a terminal and enter who it shows me on seat0 and tty2.
this is from the old days when short (two-letter) commands were invented (like vi, ex, ls, cd...), when typing grep and find were extremely tiresome. This was the time when the who command was shortened to w. Today they are not the same, they are just very similar. whow. Anyway, that was another century.
Seat0 is the default seat in Linux. It is the seat that is used when you first boot your system. The login screen is displayed on tty1, and the graphical user interface (GUI) is displayed on tty2.
TTY2 is the second terminal associated with seat0. It is typically used for running command-line programs.
In the early Unix days every login was a terminal (tty1, tty2, ...).
The login process added an entry to the utmp file.
The commands w and who query the utmp file, and could be used to show the logged in users.
A graphical desktop login does not have a terminal. Nevertheless it should make a utmp entry (X-based desktops used :0 :1 etc.). Every terminal/shell opened from the desktop should make a utmp entry as well (tty1, tty2, ...).
utmp does not really distinguish between a first system access and subsequent terminals.
systemd solves it by creating a user session for each system access (seat0, seat1, ...).
Now the loginctl command shows the logged in users.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.