setup terminal - deptno/deptno.github.io GitHub Wiki

setup terminal

macos

brew

์• ํ”Œ์‹ค๋ฆฌ์ฝ˜(M1) ํ”„๋กœ์„ธ์„œ๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์—๋Š” brew ๋Œ€์‹  arch -arm64 brew ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.

/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)"
brew install neovim
brew install hstr 
brew install alacritty
brew install tmux
brew install bottom
brew install exa
brew install fzf
brew install gpg
brew install task
brew install universal-ctags

brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font
brew install --cask google-chrome
brew install --cask finicky
brew install --cask webstorm
brew install --cask android-studio
brew install --cask notion
brew install --cask blender

python3

python3 -m pip install --upgrade pip

tmux

git clone --depth=1 https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

fork ๊ฐ€ ์กด์žฌํ•˜๋Š”๋ฐ .gitconfig ์„ค์ •์ƒ์˜ ์ด์Šˆ๋กœ ssh ์…‹์—…์ด ๋จผ์ € ์ด๋ฃจ์–ด์ ธ์•ผํ•จ

ohmyzsh

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k\
git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

xcode

xcode-select --install

rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

.dotfiles

git init
git remote add origin https://github.com/deptno/.config.git
get fetch origin
git switch master
git branch --set-upstream-to=origin/master master
git submodule update
git submodule foreach git switch master

ssh

ssh@github

generate

ssh-keygen -t ed25519 -C "[email protected]"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
pbcopy < ~/.ssh/id_ed25519.pub # github ๋“ฑ๋ก

copy from remote ssh

scp USER@HOST:/path/to/remote/pub.key ~/.ssh/

ssh@alias

$ vim ~/.ssh/config
host ALIAS
  hostname HOSTNAME_OR_IP

ssh-copy-id

ssh@publickey

ssh-copy-id -i ~/.ssh/id_ed25519.pub HOSTNAME

gpg

password ๋“ฑ๋ก์‹œ์—๋Š” GPG_TTY=$(tty) ๊ฐ€ ํ•„์š”, ์™ธ์—๋„ tmux ์™€ ๋‹ค์†Œ ์ถฉ๋Œ์ด ์žˆ์–ด์„œ ์‚ฌ์šฉํ•˜์ง€ ์•Š๊ธฐ๋กœ ํ•จ

gpg --full-generate-key # RSA(0)
gpg --list-secret-keys
gpg --armor --export IDIDIDIDIDIDIDIDIDIDIDIDIDIDIDIDIDIDIDID | pbcopy # github ๋“ฑ๋ก

vim

plugin@builtin package manager

neovim

mkdir -p .local/share/nvim/site/pack/_undefined/start # neovim

git clone -b dev --single-branch [email protected]:vimwiki/vimwiki
git clone --single-branch [email protected]:mhinz/vim-startify
git clone --single-branch [email protected]:preservim/tagbar
git clone --single-branch [email protected]:neovim/nvim-lspconfig
git clone --single-branch [email protected]:rust-lang/rust.vim
git clone --single-branch [email protected]:simrat39/rust-tools.nvim
git clone --single-branch [email protected]:hrsh7th/nvim-cmp
git clone --single-branch [email protected]:dracula/vim

git clone --single-branch [email protected]:tpope/vim-fugitive
git clone --single-branch [email protected]:tpope/vim-rhubarb
git clone --single-branch [email protected]:tpope/vim-surround

git clone -b main --single-branch [email protected]:glepnir/galaxyline.nvim
git clone --single-branch [email protected]:yamatsum/nvim-nonicons
git clone --single-branch [email protected]:kyazdani42/nvim-web-devicons

vim8

mkdir -p .vim/pack/_undefined/start
cd .vim/pack/_undefined/start

zshrc ์ˆ˜์ •

mkdir -p /usr/local/bin
export PATH=$HOME/bin:/usr/local/bin:$PATH

๋ช…๋ น์–ด๋ฅผ ๋ฎ์–ด์“ฐ๊ธฐ ์œ„ํ•ด์„œ ํ•„์š”ํ•œ ๋””๋ ‰ํ† ๋ฆฌ๋ฅผ ์ƒ์„ฑํ•œ ํ›„ path๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

ln -s nvim bin/vi
ln -s nvim bin/vim

path ๋ฅผ ๋จผ์ € ๋‘ ์œผ๋กœ์จ [vi]], [[vim]] ๋“ฑ์„ [neovim ๋กœ ๋Œ€์ฒดํ•˜์—ฌ ์‚ฌ์šฉํ•œ๋‹ค. path ๋“ฑ์—์„œ ์‚ฌ์šฉํ•˜๋Š” editor ์„ค์ •์€ alias ๋กœ๋Š” ์ž‘๋™ํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ.

wiki

git clone [email protected]:deptno/deptno.github.io.wiki
git clone [email protected]:deptno/wiki # private

ruby

์‹œ์Šคํ…œ ๋ฃจ๋น„(2.6.8 ๋กœ๊ฐ€์ •)๋ฅผ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•˜๊ณ  env ๋งŒ ์ˆ˜์ •ํ•œ๋‹ค.

chruby ๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์ง€ ์•Š์€ ๊ฒฝ์šฐ ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ์ด ํ•„์š”ํ•  ์ˆ˜ ์žˆ๋‹ค.

mkdir -p ~/.gem/ruby/2.6.8
echo "export GEM_HOME=~/.gem/ruby/2.6.8" >> ~/.zshrc
source ~/.zshrc

react-native ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋Š” ๊ฒฝ์šฐ๋Š” ์•„๋ž˜์™€ ๊ฐ™์€ ์ปค๋งจ๋“œ๋กœ ์ด์–ด์ง„๋‹ค.

gem install bundler
bundle install
bundle exe pod install

์„ค์ •

link