Results 1 to 4 of 4
I'm sure this is an easy one, but for some reason I can't find the command to list all the users of my system? I know users command will give ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 04-18-2005 #1Just Joined!
- Join Date
- Apr 2005
- Location
- Ohio
- Posts
- 12
List all user accounts on a system?
I'm sure this is an easy one, but for some reason I can't find the command to list all the users of my system? I know users command will give me a list of all the users currently logged in, but I want to know ALL users including the ones not logged in
.
- 04-18-2005 #2Linux Engineer
- Join Date
- Sep 2003
- Location
- Knoxhell, TN
- Posts
- 1,078
Code:less /etc/passwd
Their code will be beautiful, even if their desks are buried in 3 feet of crap. - esr
- 04-18-2005 #3Just Joined!
- Join Date
- Apr 2005
- Location
- Ohio
- Posts
- 12
Yep that works, I've also found a little cleaner way to do it
. Code:cat /etc/passwd | cut -d":" -f1
- 01-26-2010 #4Just Joined!
- Join Date
- Jan 2010
- Posts
- 1
Even better way:
cut -d: -f1 /etc/passwd
Supported in v8.4 of cut and possibly earlier versions.
--phar



