title: Upgrade /bin/bash on MacOS to v5+
body: <p>I am trying to install Anthos Service Mesh (ASM) for a Kubeflow installation and need /bin/bash to be v5+. MacOS comes with Bash v3.2.57 which doesn't work. Simply installing Bash v5+ in &quot;/usr/local/bin&quot; doesn't work either as several shell scripts for the install points to &quot;/bin/bash&quot; and thus I still get the old version.</p>
  <p>I had hoped I could just temporarily move the new bash v5+ to &quot;/bin/bash&quot; and then revert after completing the ASM install - something like this:</p>
  <pre><code>&gt;&gt;&gt;$sudo mv /bin/bash /bin/bash_old
  &gt;&gt;&gt;$sudo cp /usr/local/bin/bash /bin
  &gt;&gt;&gt;$make install_asm
  &gt;&gt;&gt;$sudo mv /bin/bash_old /bin/bash
  </code></pre>
  <pre><code>&gt;&gt;&gt;mv: rename /bin/bash to /bin/bash_old: Operation not permitted
  </code></pre>
  <p>So that doesn't seem to be possible</p>
  <p>What would be the best way to get around this? It doesn't seem to work just adding an alias to .zshrc in the hope that whenever I execute a shellscript with &quot;#!/bin/bash&quot; it would actually call &quot;/usr/local/bin/bash&quot;:</p>
  <pre><code>~/.zshrc:
  alias /bin/bash=&quot;/usr/local/bin/bash&quot;
  
  &gt;&gt;&gt;$/bin/bash --version
  &gt;&gt;&gt;GNU bash, version 5.1.8(1)-release (x86_64-apple-darwin19.6.0)
  
  test_bash.sh:
  
  #!/bin/bash
  /bin/bash --version
  
  &gt;&gt;&gt;$sh ./test_bash.sh
  &gt;&gt;&gt;GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)
  
  </code></pre>
  <p>Perhaps there is a way for me be permitted to move the binaries as in the example above?</p>
  <p>By the way already the &quot;/usr/local/bin/bash&quot; is a link - not sure if that has any influence on what I am trying to do.</p>
  <pre><code>&gt;&gt;&gt;$ll /usr/local/bin/bash
  &gt;&gt;&gt;/usr/local/bin/bash -&gt; ../Cellar/bash/5.1.8/bin/bash
  </code></pre>
  <p>Any hints are warmly welcomed!</p>