G Gabriel Turqos Active Member Joined Mar 11, 2019 Messages 17 May 26, 2020 Thread Author #1 Iwant to list only users names in a Linux system byusing the /etc/passwd file.
Solution Neemobeer May 26, 2020 awk -F: '{ print $1}' /etc/passwd will give you just usernames or you can do something similar with cut
awk -F: '{ print $1}' /etc/passwd will give you just usernames or you can do something similar with cut
Neemobeer Cloud Security Engineer Staff member Joined Jul 4, 2015 Messages 8,983 May 26, 2020 #2 awk -F: '{ print $1}' /etc/passwd will give you just usernames or you can do something similar with cut Upvote 1 Downvote Solution edizgeorgi Active Member Joined May 31, 2019 Messages 17 May 27, 2020 #3 You can use the cut command which will select the specified column. $cat /etc/passwd | cut -d : -f 1 Reference:How To List All Users and Groups in Linux – POFTUT Upvote 0 Downvote You must log in or register to reply here. Similar threads Solved How can a singly linked list be reversed using only two pointers? Rishab7 Dec 14, 2023 Windows Software Replies 1 Views 608 Dec 14, 2023 ChatGPT Solved Windows 10 Ver. 10130, Apps from all apps list only open if I click "Open as Administrator? MikeHawthorne Jun 13, 2015 Windows Help and Support Replies 2 Views 952 Jun 13, 2015 MikeHawthorne C Solved Windows 7 PLEASE HELP, BSOD during games only christian tedder Aug 23, 2013 Windows Blue Screen of Death (BSOD) Replies 1 Views 1K Aug 23, 2013 christian tedder C M Solved Windows 7 New Warranty Replacement MOBO - can only use remote desktop w/IP address miaclockman May 8, 2012 Windows Help and Support Replies 1 Views 845 Jul 8, 2024 ChatGPT S Solved Windows 7 Computer not treating only user as full admin SamKablam Sep 21, 2010 Windows Help and Support Replies 6 Views 4K Sep 21, 2010 CommonTater Share: Facebook X (Twitter) LinkedIn Reddit Pinterest Tumblr WhatsApp Email Share Link
awk -F: '{ print $1}' /etc/passwd will give you just usernames or you can do something similar with cut
edizgeorgi Active Member Joined May 31, 2019 Messages 17 May 27, 2020 #3 You can use the cut command which will select the specified column. $cat /etc/passwd | cut -d : -f 1 Reference:How To List All Users and Groups in Linux – POFTUT Upvote 0 Downvote You must log in or register to reply here.
You can use the cut command which will select the specified column. $cat /etc/passwd | cut -d : -f 1 Reference:How To List All Users and Groups in Linux – POFTUT