Hi
The answer to this question is the 'whoami' command.
The 'who' command returns all the users currently logged in to the system.
The 'id' command returns the current user's id (uid), their group id (gid) and all groups they are members of.
I am not aware of the username command!
Regards
AA
I'm liking the "id" command, as well as the "whoami" command.
Granted, the "id" command displays userid, groupid, etc. information.
Had the query been phrased as "...displays ONLY the username ...",
then the "whoami" command certainly would have the only acceptable
choice. However, I do understand your reasoning.
Thanks for responding!!!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.