1 | Current logged in username | whoami |
2 | All users logged in to system | who |
3 | To find user id | id |
4 | To see logged in users along with from where they logged in | w |
5 | Switch to another user, you need to know password for user | su <username> |
6 | Switch to another user with his home directory | su – <username> |
7 | To list users of environment(machine) : cat /etc/passwd
Tecmint :x:1000:1000:tecmint:/home/tecmint:/bin/bash <username> :<encrypted password> : <uid>:<user’s GID>:<Comment>:<home dir >: <users shell> |