When you drop to the terminal via Applications -> Terminal
or Ctrl+Alt+F1 etc. bash is used by default to interpret your commands. If you wish to use another command interpreter (like zsh or fish), how do you get this to start as default?
2 Answers
If you want to change your shell as a user, type:
chsh -s /path/to/your/shell
or simply
chsh
You'll have to enter your password and your login shell is set to the one you chose. You can only select a shell which is listed in /etc/shells
.
-
2I think this is the better way to go with the currently logged in user. It also does not require admin rights in order to use.– AntonyAug 4, 2010 at 9:46
Change your default shell. There is a command-line way to do this:
$ sudo usermod -s /path/to/newshell username
but it might be easier to do it from the GUI settings.
System -> Administration -> Users and Groups -> [select user] -> Advanced Settings -> Advanced
then choose the shell from the drop down list.
If the shell you want isn't in that list then it's probably not installed.
You'll need to log out and back in again for this to take effect. You can check which shell you are running in a new terminal by running "ps".
If you're very curious, the default shell is stored in /etc/passwd (which doesn't really have passwords despite the name).
-
1For someone with admin rights this is great. I have chosen to give the answer to qbi for now since it does not require admin rights.– AntonyAug 4, 2010 at 9:49