How to revert shell changes?

QuestionsQuestions4 SkillsProUser Account ManagementNov, 16 2025
0131

To revert shell changes for a user back to the default shell (for example, /bin/sh), you can use the usermod command. Here’s how to do it:

  1. Open a terminal.
  2. Run the following command, replacing username with the actual username (e.g., joker):
sudo usermod -s /bin/sh username

For example, to revert the shell for the user 'joker':

sudo usermod -s /bin/sh joker
  1. After executing this command, the default shell for the user will be changed back to /bin/sh.

You can verify the change by checking the user's information with the following command:

grep username /etc/passwd

This will display the user's entry, including the current default shell.

0 Comments

no data
Be the first to share your comment!