Issue
I'm trying to print all the usernames of users as well as their home directories. All I have found online is how to change the passwords etc. Could someone please guide me to figure this out?
echo $HOME
only prints one, not all on the system.
Solution
awk way
# https://unix.stackexchange.com/a/291452/546660
awk -F":" '{print "User: "$1 "Home Dir: "$6}' /etc/passwd
See also https://unix.stackexchange.com/a/291452/546660
Answered By - Constantin Hong Answer Checked By - Cary Denson (WPSolving Admin)