In order to get a list of all usernames and User IDs on your Amazon Linux, Ubuntu, Fedora, or any other Linux distribution you have to take a look at the /etc/passwd
Example: using cut command:# cut -d: -f-1,3 /etc/passwd
root:0
bin:1
daemon:2
adm:3
lp:4
sync:5
shutdown:6
halt:7
mail:8
operator:11
games:12
ftp:14
nobody:99
-d -> delimiter option
: -> is the delimter
-f -> is the field option
1 -> Username and 3 -> User ID

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!