I have Linux servers. There is a lot of different remote connection services like ssh, telnet, vnc, X11, konsole etc. I want to learn who is logged currently. And get details like connection way, connection time IP address etc. These information may become very crucial. There different commands to get this information.
w Command For Connected Users
w is very interesting command which can provide information about currently logged in users. It provides extra information like
Login Time etc.
- USER is the username
- TTY is connection type
- FROM is ip address of client
- `LOGIN` provides when the user logged in.
- `WHAT` provides the starting process of the session which is `XFCE` desktop in this example
who Command To Get Connected Users
who command provides similar information like
w command but it is simpler and more readable then
- `User` will display the user name which is `ismail` in this case.
- `TTY` will display terminal number which is `tty1` in this example
Get All Logins and Login Screens Waiting For User
We can get logged in users and get login screen with who commands -a parameter. This will provide more detailed information like other users.
$ who -a