Getting my old Terminal back after uninstalling fish

First, rm ~/.bashrc ~/.bash_profile ~/.profile These are not needed and don't exist by default.

Second, check to see /etc/profile is there, should be:

# System-wide .profile for sh(1)
if [ -x /usr/libexec/path_helper ]; then
    eval `/usr/libexec/path_helper -s`
fi
if [ "${BASH-no}" != "no" ]; then
    [ -r /etc/bashrc ] && . /etc/bashrc
fi

Third, check /etc/bashrc (this is where your prompt is defined). Should be:

# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
   return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
# Tell the terminal about the working directory at each prompt.
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then
    update_terminal_cwd() {
        # Identify the directory using a "file:" scheme URL,
        # including the host name to disambiguate local vs.
        # remote connections. Percent-escape spaces.
    local SEARCH=' '
    local REPLACE='%20'
    local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
    printf '\e]7;%s\a' "$PWD_URL"
    }
    PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND"
fi

Finally, if it's still not working make sure you have /bin/bash set as your default shell using the advanced options in the User & Groups System Preference. If you don't login with bash, it will bypass the configs in /etc/


The simplest way to get back your default .bash_profile might be to just create a new user on your Mac. Log in and copy the desired files to that user's shared/public folder. Then log in as you and copy them to the root of your profile folder.

The added bonus of this is that you now have a virgin, virtually untouched, user that you can use when troubleshooting your Mac. Unless you are short of disk space a new user profile is not that big and can be valuable in troubleshooting.


Clarification: There are two default shell settings.

  • One is the Unix setting and can be changed with chsh -s.
  • The other is the Terminal.app-specific setting, and can be changed in Terminal preferences.

You can set your Terminal default shell command to /bin/bash -l in the Terminal app.

screenshot

-l tells Bash to read startup files. Even if you don't have any user-specific startup files, there are system-wide startup files that will, among other things, set the prompt to the one you're familiar with.

If you've properly set your Unix default shell, you should be able to select Default login shell in Terminal preferences and this will happen automatically.