What is the best way to find out if the current user is logged in via a local console on a Debian Linux machine (ttyS0 in my case)? I have a script where I want to restrict some options which would break a network connection. The who commands lists current users and their connections, but potentially the user could be logged in via multiple connections simultaneously and I don't known which one is me.
If you want to get informations about the current connexion, you can use
Or you can simply type
Well you can use the
Name of the user User’s machine number or tty number Remote machine address User’s Login time Idle time (not usable time) Time used by all processes attached to the tty (JCPU time) Time used by the current process (PCPU time) Command currently getting executed by the users
Or if you just want to see who's logged in use
For more info regarding the commands check the