Each line of the Unix password fi le (/etc/passwd) contains information about a userid. Within the line, the various fi elds of data are delimited by : (colon) characters. One of the fi elds contains the name of the shell for that userid. Use the following command to display and study the format of the password fi le on your system:
less /etc/password
(From within less, you can press to display the page down and q to quit.) What command would you use to read the password fi le and display a list of the various shells used on your system? How would you sort the output to make it more readable? How would you eliminate duplications?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here