Use the id
command to display the name of the currently logged in user.
See Also:
"Miscellaneous Commands" for related commandsNo rights are required to run the id
command.
id [ --long/-l ]
Displays user and class. By default id
displays only the class.
Example 2-37 displays the current user, logs out, logs in again as a different user, and then displays current user information.