How can I check the current logged-in user in Ubuntu?
You can use the following command to view the current logged-in user:
whoami
This command will display the username of the current logged-in user. You can also use the following command to view detailed information about the current user:
id
This command will display the current user’s UID (User ID), GID (Group ID) and information about other groups they belong to.