

Change this to Default Login Shell and enter the new complete path of bash-4.3.30, changing USERNAME to the name of your home directory: /Users/USERNAME/Bin/bash/bin/bash If you want to run bash-4.3.30 by default, you can change your default login shell in the Terminal.app: Preferences… > General > Shells Open With >.
#Install bash on mac os x full#
Now, you've got a few different options as for making use of bash-4.3.30 without having to enter the full path every time you want to launch it. exit again and you'll more than likely close the terminal window and logout of the shell session. Now type exit and you'll exit out of bash4.3.30 and be back in the old bash. It might seem weird, but you are running bash-4.3.30 right now, but you're running it as a child process within /bin/bash (the old bash). So, do: /Users/USERNAME/Bin/bash/bin/bash -version to see the difference. Now, to see the version, enter the full path to the proper program you want to interpret that argument, which is the new bash-4.3.30, and is the same as the value of $0 which you just got back from echo. $0 is a special parameter for bash, that stores the name of the executing process, which in this case, is bash-4.3.30 (the one who is doing your bidding on your behalf, usually executing other programs for you). If you want to know which shell you're running from the command line, do: echo $0 So, how can we fix this? Or, at least, how can we see that we are in fact running bash-4.3.30? So, at this point, if you want to run bash-4.3.30 from the command-line, enter the full path, replacing USERNAME with the name of your home directory: /Users/USERNAME/Bin/bash/bin/bash And you can do a bash -version and say, "Hey, wtf! Why am I still running the old bash?" And that's because you've invoked the old bash! Once again, entering the command bash is going to more than likely get resolved to /bin/bash. To launch the new bash, you can't just enter the command bash because then bash is going to look at your PATH variable and go down the list and try to find bash, and it's most likely going to come up with /bin/bash before it finds your new bash, especially since the new bash might be (if you followed my advice) in a folder called ~/Bin which isn't even a part of your PATH, yet. The thing to be aware of is that when you launch the Terminal app and open a new shell, you're default shell is still going to be the old bash, unless you change it (more on that below). It's just like having a differently named shell on your system, like zsh, sh, csh, etc. This is what I'm doing, and I plan to continue. It is even desirable for testing and backwards compatibility. You now have two different versions of bash installed on your system. # Note: You can do without sudo since you're installing locally. #+ elsewhere, use -prefix and the location of your choosing.
#Install bash on mac os x install#
#+ with an argument for the install location. Optionally, you can include the -prefix option along # Create a directory to store some of your user programs. # Change into the directory (of the unpacked archive). Everything prefixed with a "#" is a comment, so don't enter it at the command line! # Unpack the archive. Otherwise, I'll point out where you can change this. Once you've got bash downloaded, you can pretty much run these commands in sequential order, if you're okay with installing at ~/Bin (which is my suggestion you can always move it later). I went with v4.3.30 since it looks like v4.4 is still being tested, or only recently finished.ĭownload it (v4.3.30 in this case) from the source: I just did this the other day for macOS 10.12.x. Just change anything that is in all CAPS, usually.

You can almost copy/paste these commands in sequence.

It probably takes about a total of 2 minutes or less depending on your system. Note: This is really not a difficult process.
