A Linux shell is a command-line interface that lets you interact with your operating system. It interprets commands and sends them to the OS for execution.
To set the default shell to Bash, you can use the chsh command:
chsh -s /bin/bash
You’ll need to enter your password to confirm the change. After running this command, the change will take effect the next time you log in.
If you want to change the default shell for a different user, you can specify the username:
sudo chsh -s /bin/bash <username>
Some common linux shells:
- Bash (Bourne-Again SHell):
/bin/bash– Widely used and default on many Linux distributions. - Zsh (Z shell):
/bin/zsh– Known for its customization options and features like auto-suggestions. - Fish:
/usr/bin/fish– User-friendly shell with features like auto-suggestions and syntax highlighting. - Dash:
/bin/dash– Lightweight shell, often used as a default shell for system scripts. - Tcsh:
/bin/tcsh– An enhanced version of the C shell (csh), with advanced features. - Ksh (KornShell):
/bin/ksh– A Unix shell developed by David Korn. - Csh (C shell):
/bin/csh– A shell with a syntax similar to the C programming language.