{"id":25552,"date":"2019-06-04T16:24:53","date_gmt":"2019-06-04T20:24:53","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=25552"},"modified":"2019-10-11T11:41:05","modified_gmt":"2019-10-11T15:41:05","slug":"macos-10-15-switches-from-bash-to-zsh","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2019\/06\/04\/macos-10-15-switches-from-bash-to-zsh\/","title":{"rendered":"macOS 10.15 Switches From bash to zsh"},"content":{"rendered":"<p><a href=\"https:\/\/support.apple.com\/en-ca\/HT208050\">Apple<\/a> (<a href=\"https:\/\/news.ycombinator.com\/item?id=20090193\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/support.apple.com\/en-ca\/HT208050\">\n<p>Starting with the macOS Catalina beta, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.<\/p>\n<p>[&#8230;]<\/p>\n<p>zsh is highly compatible with the Bourne shell (sh) and mostly compatible with bash, with some differences. For more about zsh and its comprehensive command-line completion system, enter <code>man&nbsp;zsh<\/code> in Terminal.<\/p>\n<\/blockquote>\n\n<p>It doesn&rsquo;t change the default shell of existing accounts.<\/p>\n\n<p><a href=\"https:\/\/twitter.com\/wincent\/status\/1135797906961850369\">Greg Hurrell<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/wincent\/status\/1135797906961850369\">\n<p>I like Zsh and use it, but I don&rsquo;t know why anyone would be excited about this. It is probably going to be a years-old version anyway. I&rsquo;ll still be installing it with Homebrew.<\/p>\n<\/blockquote>\n\n<p>It actually seems to be the current version, 5.7.1.<\/p>\n\n<p>See also: <a href=\"https:\/\/en.wikipedia.org\/wiki\/Z_shell\">Wikipedia<\/a>.<\/p>\n\n<p>Update (2019-06-04): <a href=\"https:\/\/twitter.com\/wincent\/status\/1136012899367960577\">Greg Hurrell<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/wincent\/status\/1136012899367960577\">\n<p>All of this probably motivated by a desire to get away from GPL to MIT.<\/p>\n<\/blockquote>\n\n<p>I think that&rsquo;s it. The version of bash included is from 2007.<\/p>\n\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2019\/01\/04\/mojaves-rsync-from-the-days-of-tiger\/\">Mojave&rsquo;s rsync From the Days of Tiger<\/a>.<\/p>\n\n<p id=\"macos-10-15-switches-from-bash-to-zsh-update-2019-06-06\">Update (2019-06-06): <a href=\"http:\/\/meta.ath0.com\/2012\/02\/05\/apples-great-gpl-purge\/\">Matthew<\/a> (2002, <a href=\"https:\/\/twitter.com\/robenkleene\/status\/1136040870187274241\">tweet<\/a>):<\/p>\n<blockquote cite=\"http:\/\/meta.ath0.com\/2012\/02\/05\/apples-great-gpl-purge\/\">\n<p>As of 10.10 the remaining GPL-only packages seemed to be JavaScriptCore, bash, bc, emacs, efax, gnudiff, gnuserv, gnutar, groff, gpatch, keymgr, libstdcxx, man, nano, screen, texinfo, and uucp. I include this list as Apple have stopped listing the licenses on their download page, to make it harder to track their progress&#8230;<\/p>\n<p>The trend supports the idea that Apple is trying to remove all GPL-licensed software from OS X.<\/p>\n<\/blockquote>\n\n<p>See also: <a href=\"https:\/\/apple.slashdot.org\/story\/19\/06\/04\/1645240\/apple-replaces-bash-with-zsh-as-the-default-shell-in-macos-catalina\">Slashdot<\/a>, <a href=\"https:\/\/news.ycombinator.com\/item?id=20102427\">Hacker News<\/a>.<\/p>\n\n<p><a href=\"https:\/\/scriptingosx.com\/2019\/06\/moving-to-zsh\/\">Armin Briegel<\/a>:<\/p>\n<blockquote cite=\"https:\/\/scriptingosx.com\/2019\/06\/moving-to-zsh\/\">\n<p>Apple is strongly messaging that you should switch shells. This is different from the last switch in Mac OS X 10.3 Panther, when Apple switched the default to <code>bash<\/code>, but didn&rsquo;t really care if you remained on <code>tcsh<\/code>. In fact, <code>tcsh<\/code> is still present on macOS.<\/p>\n<p>Apple&rsquo;s messaging should tell us, that the days of <code>\/bin\/bash<\/code> <em>are<\/em> numbered. Probably not <em>very<\/em> soon, but eventually keeping a more than ten year old version of <code>bash<\/code> on the system will turn into a liability. The built-in bash had to be patched in 2014 to mitigate the &lsquo;Shellshock&rsquo; vulnerability. At some point Apple will consider the cost of continued maintenance too high.<\/p>\n<\/blockquote>\n\n<p id=\"macos-10-15-switches-from-bash-to-zsh-update-2019-10-11\">Update (2019-10-11): <a href=\"https:\/\/twitter.com\/snipeyhead\/status\/1181416463900405760\">snipe<\/a>:<\/p>\n<blockquote cite=\"https:\/\/twitter.com\/snipeyhead\/status\/1181416463900405760\">\n<p>zsh is the new default shell for MacOS Catalina. To change it back and get rid of the super annoying terminal message, enter:<\/p>\n<pre>chsh -s \/bin\/bash<\/pre>\n<p>in a terminal, then open <tt>\/home\/your-user\/.bash_profile<\/tt> &amp; add <code>export BASH_SILENCE_DEPRECATION_WARNING=1<\/code><\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Apple (Hacker News): Starting with the macOS Catalina beta, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well. [&#8230;] zsh is highly compatible with the Bourne shell (sh) and mostly compatible with bash, with some differences. For more about [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2019-06-04T20:24:57Z","apple_news_api_id":"f7991359-bf66-470a-adb2-1a1c042b6dbf","apple_news_api_modified_at":"2019-10-11T15:41:10Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAABQ==","apple_news_api_share_url":"https:\/\/apple.news\/A95kTWb9mRwqtshocBCttvw","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[767,30,1666,991,318,163,1817],"class_list":["post-25552","post","type-post","status-publish","format-standard","hentry","category-technology","tag-bash","tag-mac","tag-macos-10-15","tag-open-source-software","tag-terminal","tag-unix","tag-zsh"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/25552","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=25552"}],"version-history":[{"count":6,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/25552\/revisions"}],"predecessor-version":[{"id":26841,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/25552\/revisions\/26841"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=25552"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=25552"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=25552"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}