MacBookPro M1 の初期設定
間違っている場所あったら優しく教えてね
Xcode
applestoreからインストール
Homebrew
公式サイトにあるコマンドを実行する。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
色々インストールされた後にPATHが通ってないぜというワーニングが出てくる。
==> Pouring portable-ruby-2.6.8.arm64_big_sur.bottle.tar.gz Warning: /opt/homebrew/bin is not in your PATH. Instructions on how to configure your shell for Homebrew can be found in the 'Next steps' section below.
Next stepを見てみると2つのコマンド実行しろと言われる。
==> Next steps: - Run these two commands in your terminal to add Homebrew to your PATH: echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/USERNAME/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)" - Run brew help to get started - Further documentation: https://docs.brew.sh
実行するとbrew help
コマンドが使えるようになっている。
$ brew --version Homebrew 3.3.5 Homebrew/homebrew-core (git revision c32f243acad; last commit 2021-11-28)
ちなみに何もインストールしてないので
$ brew list
何も表示されない。brew listで綺麗な状態は今だけだろう。。
git
gitがないと何もできないことがよく知られている。
$ brew install git
綺麗だったbrewを早速汚していくことになる。早速わけのわからんものまで付いてきた。
$ brew list
==> Formulae
gettext git pcre2
インストールはできているようだ。
$ git --version git version 2.30.1 (Apple Git-130)
これでひとまず安心ではなかった。
sshkey
sshkeyを作ってgitHubに登録しなくてはならない。しなくてはならないわけではないがしておく。rsaでいいでしょう。
$ ssh-keygen -t rsa -C "comment"
パッと作ってくれる。.ssh/id_rsa.pub
の公開鍵暗号をgitHubに登録すればsshを使ってgitHubを使えるようになる。
終わり
ぼくが今必要なのはこれくらいだろう。
pythonとかDocker、nodeあたりはまた必要に迫った時に入れようと思う。今はUnityが動けばいいって感じです。