Languages
[Edit]
EN

Bash - how to list system users in Linux?

11 points
Created by:
Root-ssh
6357

Using Bash it is possible to list users in Linux in following way.

1. /etc/passwd file example

$ cat /etc/passwd | cut -d : -f 1

Output:

root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy

#...

 

Hey 👋
Would you like to know what we do?
  • Dirask is a friendly IT community for learners, professionals and hobbyists to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.