💻

Mac買い替えたのでセットアップ

に公開

MacBook を買い替えたので、セットアップをしたので、記録を残す。

XCode

  • xcode-select --install
  • sudo xcodebuild -license

Homebrew

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
  • eval "$(/opt/homebrew/bin/brew shellenv)"

terminal

  • brew install --cask font-myrica font-myricam
  • brew install --cask font-hack-nerd-font
  • brew install starship
  • echo 'eval "$(starship init zsh)"' >> ~/.zprofile
  • mkdir -p ~/.config
  • vim ~/.config/starship.toml
  • touch ~/.zshrc

ツール

  • brew install sed
  • brew install grep
  • brew install git
  • brew install visual-studio-code
  • brew install --cask docker
  • brew install --cask chatwork
  • brew install notion
  • brew install zoom
  • brew install ffmpeg
  • brew install openapi-generator
  • brew install --cask deepl
  • brew install --cask dropbox

補完

  • brew install zsh-completions
cat << EOF >> ~/.zprofile
if type brew &>/dev/null; then
  FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
  autoload -Uz compinit
  compinit
fi
EOF

言語

node

  • brew install nodenv
  • echo 'eval "$(nodenv init -)"' >> ~/.zprofile

PHP8 系

  • brew install php@8.4
  • brew install php@8.1
  • echo 'alias php81="brew unlink php && brew link --force --overwrite php@8.1"' >> ~/.zshrc
  • echo 'alias php84="brew unlink php && brew link --force --overwrite php@8.4"' >> ~/.zshrc
  • brew install composer

PHP7 系

  • brew tap shivammathur/php
  • brew install shivammathur/php/php@7.2
  • brew install shivammathur/php/php@7.4
  • echo 'alias php72="brew unlink php && brew unlink php@7.2 && brew link --force --overwrite php@7.2"' >> ~/.zshrc
  • echo 'alias php74="brew unlink php && brew unlink php@7.4 && brew link --force --overwrite php@7.4"' >> ~/.zshrc

Ruby

  • brew install rbenv

Python

  • brew install pyenv
  • echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zprofile
  • echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zprofile
  • echo 'eval "$(pyenv init -)"' >> ~/.zprofile
  • source ~/.zshrc

Rust

  • brew install rustup
  • echo 'export PATH="/opt/homebrew/opt/rustup/bin:$PATH"' >> ~/.zprofile
  • rustup-init
  • echo '. "$HOME/.cargo/env"' >> ~/.zprofile

ngrok

  • brew install ngrok/ngrok/ngrok
  • ngrok config add-authtoken <authtoken>

ブラウザでインストールしちゃった

  • brew install figma
  • brew install slack
  • brew install google-chrome

SSH の設定

  • mkdir -m 700 ~/.ssh
  • mkdir -m 755 ~/.ssh/conf.d
  • touch ~/.ssh/config
  • echo 'Include ~/.ssh/conf.d/*.conf' >> ~/.ssh/config

github の設定

  • ssh-keygen -t ed25519 -f ~/.ssh/github
  • pbcopy < ~/.ssh/github.pub
  • Add new SSH Key
  • ssh -T git@github.com
  • vim ~/.ssh/conf.d/github.conf
Host github.com
HostName github.com
User git
Port 22
IdentityFile ~/.ssh/github
TCPKeepAlive yes
IdentitiesOnly yes

フォルダ

  • mkdir ~/Projects

その他 GUI での設定

そのうち書く

Discussion