ubuntu check user code example
Example 1: ubuntu list users
cat /etc/passwd
Example 2: ubuntu know username
whoami
or
echo $USER
Example 3: list all user ubuntu server
cut -d: -f1 /etc/passwd
cat /etc/passwd
whoami
or
echo $USER
cut -d: -f1 /etc/passwd