CHECK USER IN ubuntu code example Example 1: ubuntu know username whoami or echo $USER Example 2: get users shell getent passwd $LOGNAME | cut -d: -f7