http://buddylindsey.com/upgrade-bash-to-4-on-os-x/

Unfortunately, Apple has decided to ship an old version of bash shell. When I go back and forth between linux and OSX sometimes I hit minor inconsistencies because of this. One big one is the git-prompt scripts. As such I finally decided to upgrade to version 4 of bash.

It is a very easy process, 2 minutes, and you are on your way. First, though you need homebrew installed and up-to-date.

Steps

Installation

1
brew install bash

Add it to Your Shells

You need to add it to your shells which is easy. Add the following line to `/etc/shells`

1
/usr/local/bin/bash

Change Your Shell

1
chsh

change the line that has Shell to the location that your newly brew installed bash is located.

1
Shell: /usr/local/bin/bash

Restart Terminal

Close your terminal and open it again.

Verification

To see your current version of bash do the following:

1
echo $BASH_VERSION

It should echo something like `4.2.45(2)-release`

Conclusion

It is that simple. I though it would be hard until I did it.

Upgrade Bash to 4+ on OS X的更多相关文章

  1. Upgrade Bash on Ubuntu from 14.04 to 16.04

    过程 1 sudo -S apt-mark hold sudo sudo -S apt-mark hold procps sudo -S apt-mark hold strace 2 sudo do- ...

  2. Day5模块-os和sys模块

    os模块:操作系统调用的接口 ------------------------------------------------------------------------------------- ...

  3. Shell脚本编程30分钟入门

    Shell脚本编程30分钟入门 转载地址: Shell脚本编程30分钟入门 什么是Shell脚本 示例 看个例子吧: #!/bin/sh cd ~ mkdir shell_tut cd shell_t ...

  4. 【转】linux ar 命令的使用说明那个和例子

    from: http://blog.csdn.net/xljiulong/article/details/7082960 linux ar 命令的使用说明那个和例子 标签: linuxmakefile ...

  5. 使程序在Linux下后台运行

    一.为什么要使程序在后台执行 我们计算的程序都是周期很长的,通常要几个小时甚至一个星期.我们用的环境是用putty远程连接到日本Linux服务器.所以使程序在后台跑有以下三个好处: 1:我们这边是否关 ...

  6. Linux命令之ar - 创建静态库.a文件和动态库.so

    转自:http://blog.csdn.net/eastonwoo/article/details/8241693 用途说明 创建静态库.a文件.用C/C++开发程序时经常用到,但我很少单独在命令行中 ...

  7. linux命令后台运行

    有两种方式: 1. command & : 后台运行,你关掉终端会停止运行    2. nohup command & : 后台运行,你关掉终端也会继续运行 一. 简介     Lin ...

  8. linux使脚本在后台运行

    一.为什么要使程序在后台执行 我们计算的程序都是周期很长的,通常要几个小时甚至一个星期.我们用的环境是用putty远程连接到日本Linux服务器.所以使程序在后台跑有以下三个好处: 1:我们这边是否关 ...

  9. 使用python脚本实现基于指定字符串的文本排序

    朋友用ansible导出了一个文件,文件中包含上千台机器的磁盘信息,他想要知道哪些机器最需要赶紧扩磁盘.思路是,按剩余磁盘空间百分数,从小到大对文本内容重新排序.下面是具体实现. 源文件ip.txt的 ...

随机推荐

  1. Silverlight for Windows Phone开发系列课程

    Silverlight for Windows Phone开发系列课程(1):Windows Phone平台概况         课程简介:本节开始介绍系列课程的概况,包括课程内容,先决条件,学习目的 ...

  2. Alias Method for Sampling 采样方法

    [Alias Method for Sampling]原理 对于处理离散分布的随机变量的取样问题,Alias Method for Sampling 是一种很高效的方式. 在初始好之后,每次取样的复杂 ...

  3. 转 windows查看端口占用命令

    转自  http://www.cnblogs.com/allenblogs/archive/2010/06/25/1765055.html 开始--运行--cmd 进入命令提示符 输入netstat ...

  4. Using 1-Wire device with Intel Galileo

    Using 1-Wire device with Intel Galileo 3 Replies Many people have had trouble with getting 1-Wire de ...

  5. 【MySQL】乐观锁和悲观锁

    最近学习了一下数据库的悲观锁和乐观锁,根据自己的理解和网上参考资料总结如下: 悲观锁介绍(百科): 悲观锁,正如其名,它指的是对数据被外界(包括本系统当前的其他事务,以及来自外部系统的事务处理)修改持 ...

  6. 【jsp】怎么在jsp文件中引入静态文件(.js .css)

    如果在jsp文件中引入静态文件比如(.js或.css等等),可以在使用 /项目名称/路径 的方式,但是这种方式如果在修改了项目了名称后就显得比较麻烦了.除了之外还许多方式,比如相对路径等等.一般情况下 ...

  7. IT系统故障引起的一个事故的思考

    记得几年前在我以前工作过的一个公司,因为系统的一个审批流突然中断,而且也没有在系统中触发邮件和短信等提示消息,而且我们的相关的审批人员和发 起人也没有在意.直到流程发起的同事在采购物品即将要使用的前2 ...

  8. 使用SQL Server发送邮件时遇到的诡异事件

    最近公司要实现一个邮件群发的功能,因此设计时就考虑用SQL Server的邮件发送功能直接推送邮件算了. 可是在实现的过程中,邮件内容中有一个表格的内容要展现,于是就编排了一个表格来实现. 具体实现如 ...

  9. JQuery EasyUI combobox 省市两级联动

    表名:province  结构如下 CallIn.tpl 模板页 <select id="consult_province" name="consult_provi ...

  10. CListCtrl选中某行

    原文链接: http://blog.csdn.net/wxq1987525/article/details/7461461 1.设置CListCtrl选中行 m_list.SetItemState( ...