Getting-Started with Terminal Commands on Linux
Hi! The Tip shows you How to Find your’s Username and Primary Group on Linux Terminal/Console.
The Commands are Intended for Execution on the Bash Shell but Most should Works also for the Bourne, C, TC and Korn Shells…
How to Quick Start with Command Line on Linux
-
To Find your’s Username.
whoami
-
To Find your’s User Primary Group.
id -g -n $LOGNAME
And for Another User:
id -g -n [userName]