3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Mac ターミナルのデフォルトshellをzsh → bashに変更する

Last updated at Posted at 2023-03-29

概要

  • Macのデフォルトshellをzsh → bashに変更する方法をまとめる。
  • 下記の方法1もしくは方法2どちらかを実施する。

方法1 デフォルトのshell設定を変更

  1. まずは現在のデフォルトshellを確認する。

    echo $SHELL
    
  2. 割り当て可能なshellの一覧を出力する。

    cat /etc/shells
    
  3. 上記の出力で/bin/bashがあったのでこのパスを使って設定を行う。

  4. 下記コマンドを実行してshellをbashに切り替える。

    chsh -s /bin/bash
    

方法2 ターミナルのデフォルトのshell設定を変更

  1. Macのfinderで「ターミナル」と検索しヒットしたターミナルのアイコンをダブルクリックして開く。

  2. 開いたターミナルウインドウをクリックしてアクティブ状態にし、左上の「ターミナル」をクリックする。

    Menubar_と_shun_—-zsh—_80×24.png

  3. 「設定」をクリックする。

  4. 「開くシェル」のラジオボタンを「コマンド(完全パス)」を選択し/bin/bashとする。

    一般.png

  5. ターミナルを再起動する。

  6. 下記を実行してデフォルトshellを確認する。

    echo $SHELL
    

参考文献

3
4
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?