博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Upgrade Bash to 4+ on OS X
阅读量:4350 次
发布时间:2019-06-07

本文共 1022 字,大约阅读时间需要 3 分钟。

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  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.

转载于:https://www.cnblogs.com/liulipeng/p/3938512.html

你可能感兴趣的文章
redis 中文字符显示
查看>>
登录日志分析常用查询
查看>>
Codeforces Round #228 (Div. 1) 388B Fox and Minimal path
查看>>
【nosql实现企业网站系列之一】mongodb的安装
查看>>
短信服务供应商价格总览
查看>>
获取本机IP(考虑多块网卡、虚拟机等复杂情况)
查看>>
笔记之_java整理ORM框架
查看>>
CentOS下安装python3.x版本
查看>>
CAP定理(原则)以及BASE理论
查看>>
「玩转树莓派」搭建属于自己的云盘服务
查看>>
有道语料库爬虫
查看>>
VS2019 实用设置
查看>>
for循环语句之求和,阶乘,求偶,求n次篮球蹦起高度
查看>>
CFileDialog
查看>>
[转载]EXTJS学习
查看>>
SQL Server2012完全备份、差异备份、事务日志备份和还原操作
查看>>
Flash动画播放
查看>>
springmvc+mybatis+dubbo+zookeeper 分布式架构
查看>>
HDUOJ-----Computer Transformation
查看>>
HDUOJ-----2838Cow Sorting(组合树状数组)
查看>>