Solved

How to find out Linux users in Centos 6

Posted on 2012-04-03
4
704 Views
Last Modified: 2012-06-21
Experts,

Hi an easy question.  How do I find out the list of users that are available in my CentOS server?
CentOS release 6.2

Thank you
0
Comment
Question by:RandallVillalobos
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 3

Accepted Solution

by:
deepak_iq earned 250 total points
ID: 37803484
cat /etc/passwd
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 130 total points
ID: 37803497
cut -f1 -d":"  /etc/passwd

A "pure shell" solution:

while read line; do echo ${line%%:*} ; done < /etc/passwd
0
 
LVL 40

Assisted Solution

by:omarfarid
omarfarid earned 120 total points
ID: 37803518
if you want list of logged in users then use

who
or
w

if you want to find users names then look at /etc/passwd file in the first field

you can run

awk -F: '{ print $1 }' /etc/passwd
0
 

Author Closing Comment

by:RandallVillalobos
ID: 37803544
Amazing, I'm enjoying this Linux journey! thanks
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question