views:

699

answers:

5

I do not like to write fish again and again when I start terminal. I want fish on by default.

+4  A: 

Mac OS X: How to change the Terminal shell

Gumbo
+1  A: 

the chsh program will let you change your default shell. It will want the full path to the executable, so if your shell is fish then it will want you to provide the output given when you type which fish.

You'll see a line starting with "Shell:". If you've never edited it, it most likely says "Shell: /bin/bash". Replace that /bin/bash path with the path to your desired shell.

rejj
+2  A: 
heimdall:~ leeg$ dscl
Entering interactive mode... (type "help" for commands)
 > cd /Local/Default/Users/
/Local/Default/Users > read leeg
[...]
UserShell: /bin/bash
/Local/Default/Users >

just change that value (with the write command in dscl).

Graham Lee
I get this error when I run read leeg: <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
Masi
Yes. That's because leeg is _my_ username, not yours :P
Graham Lee
+3  A: 

doesn't chsh exists under mac os?

if it does, just hit chsh.

Run the following code, for instance, to change your shell to Zsh

chsh -s /bin/zsh
Aif
+2  A: 

Here's another way to do it:

Assuming you installed it with MacPorts, which can be done by doing:

sudo port install fish

Your shell will be located in /opt/local/bin/fish.

You need to tell OSX that this is a valid shell. To do that, add this path to the end of the /etc/shells file.

Once you've done this, you can change the shell by going to System Preferences -> Accounts. Click on the Lock to allow changes. Right-click on the account, and choose "Advanced Options...". In the "Login shell" field, add the path to fish.

lorin