Home > other >  installing latest bash on macos 12.x
installing latest bash on macos 12.x

Time:03-21

I was trying a cp command that ran fine under ubuntu 20, namely

(base) jr@Historys-MacBook-Air test % cp --backup=numbered src dest
cp: illegal option -- -

which struck me as weird, so checking the man page I saw

HISTORY
     A cp command appeared in Version 1 AT&T UNIX.
macOS 12.0                                                       February 23, 2005                                                       

and I figured the shell might be to blame - I found I was in zsh

(base) jr@Historys-MacBook-Air test % echo $0
-zsh

and when I start a terminal in bash its an old version:

(base) jr@Historys-MacBook-Air test % /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.

So I tried to brew install the latest and then chsh to it but got 'non-standard shell':

...
==> Pouring bash--5.1.16.arm64_monterey.bottle.tar.gz
           
  • Related