How to print list of users and groups on FreeBSD?
Asked
Active
Viewed 6.7k times
1 Answers
22
users and groups stored in /etc/group and /etc/passwd. To print:
awk -F":" '{print $1}' /etc/passwd
awk -F":" '{print $1}' /etc/group
for more details
awk -F":" '{print $0 $1 $2}' /etc/passwd
-
2On FreeBSD you get some comment lines in the beginning. Add | grep -v "^#" to delete those from output. – blablabla Dec 19 '15 at 13:45