Which command modifies a user's shell in Linux?

Prepare for the Linux Professional Institute Certification Level 1. Use flashcards and multiple choice questions, complete with hints and explanations. Enhance your understanding and get ready to ace the exam!

The command that modifies a user's shell in Linux is chsh. This command stands for "change shell" and allows users to change their default login shell to a different shell listed in the /etc/shells file. By executing the chsh command followed by appropriate options, users can select a different shell, such as bash, zsh, or sh, for their command execution environment.

While the usermod command can also be used to change a user’s shell among its various functionalities, it typically requires administrative privileges and is more generally used for modifying user account attributes like user IDs, group memberships, and home directories. Therefore, chsh is specifically designed for users to modify their own shell configurations easily.

The options chuser and set_shell are not standard commands in typical Linux distributions for changing a user's shell. They might not exist or be recognized as valid commands in many Linux systems, making them incorrect choices for this functionality.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy