linux list all users and uid code example Example: get users shell getent passwd $LOGNAME | cut -d: -f7