Multiple choice technology programming languages

How to set the default shell for an user?

  1. Use chshell command

  2. update the file /var/passwd

  3. update the file /etc/users

  4. update the file /etc/passwd

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

The default shell for a user is stored in /etc/passwd file. The last field of each line specifies the login shell. Options A, B, and C are incorrect - there's no chshell command, and the paths are wrong (/var/passwd and /etc/users don't exist for this purpose). The chsh command is actually the preferred method to interactively change shells.