how to get user list in centos code example Example 1: list users in linux Click to copycat /etc/passwd Example 2: get users shell Click to copygetent passwd $LOGNAME | cut -d: -f7