0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Macのターミナルで%(zhs)から$(bash)に変更

Last updated at Posted at 2021-05-07

プログラミング初心者です

問題

初めてMacのターミナルを開いたら

Last login: Wed May  5 23:27:11 on ttys000
***@***************** ~ % 

"$"じゃないの? と思っているところが"%"になっていました

・調べてみるとシェルを変更しなければなりません(Mac OS Catalina以降設定がzashらしいです)
・"%"の人はzhsっていうやつ、 "$"にするのはbashっていうやつに変更します
・システム環境設定でも変更できるみたいなんですが、アカウントが壊れる可能性があるので、ターミナル上で変更します

解決方法

1 bashなのかzshなのか確認

$ echo $SHELL

2 変更可能なシェルを確認

$ cat /etc/shells

3 シェルの変更

$ chsh -s /bin/bash

4 鍵マークのパスワード入力(打っても鍵マークが動かないが、入力できていてenter押せばOK)
5 再起動

で自分は変更できました

0
0
0

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?