linux get current user shell code example Example: get users shell getent passwd $LOGNAME | cut -d: -f7