ターミナルを開く
MacbookのCUIの入口はターミナルというアイコンです。Launchpadから「その他」のアイコンを開くと、中に「ターミナル」というアイコンがあります。見つからないときはLaunchpadを開いて画面の上の方にある検索ボックスで「ターミナル」と入力して検索して下さい。
「ターミナル」を開くと、macOSが入力待ちの状態ということを示すプロンプトが現れます。
シェルについては後日書きますが、私はbashというシェルを使っているので、次のような画面が出ます。超訳すると、「'chsh -s /bin/zsh'というコマンド(命令文)を入れればzshというシェルが使えますよ。詳しくはアップルのURLを見てね。」ということで、それはどうでもいいのですが、一番下のoh:~ ohr$がプロンプトです。
Last login: Fri Aug 29 18:09:46 on console
The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
oh:~ ohr$
macOSのプロンプトは、MacBookの名前とユーザー名を組み合わせて作られています。ohがこのMacBookの名称で、私のユーザー名がohrです。$は一般ユーザーの権限という意味です。
ohr@oh%というメールアドレスのようなプロンプトが出ている方も多いかと思います。どのような表示になるかは人によって異なりますが、文字列の右端に$や%や#が出ていたらそれがプロンプトで、macOSが入力待ちの状態にあるということです。
私は覚えていないのですが、初めてターミナルを開く人には、次のようなメニュー画面が出るかもしれません。とりあえず数字キーで0を押せば次に進めると思います。
This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~). This function can help you with a few settings that should
make your use of the shell easier.
You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment.
That will prevent this function being run again.
(1) Continue to the main menu.
(2) Populate your ~/.zshrc with the configuration recommended
by the system administrator and exit (you will need to edit
the file by hand, if so desired).
--- Type one of the keys in parentheses ---