LA FORET ROUGE

Mac, Ubuntu initial settings

⏱ 2m | Categories: OS | Tags: MAC , UBUNTU , RPI , OS

개발을 할 때 개인적으로 맥과 우분투, 라즈베리 파이를 많이 사용합니다. 새 우분투 vm을 만들거나 라즈베리 파이를 사용할 때 매번 처음부터 설정을 해야 합니다. 그래서 그 작업을 쉽게 하기 위해 제가 사용하는 프로그램과 환경을 정리해봤습니다.

개발을 할 때 개인적으로 맥과 우분투, 라즈베리 파이를 많이 사용합니다. 새 우분투 vm을 만들거나 라즈베리 파이를 사용할 때 매번 처음부터 설정을 해야 합니다. 그래서 그 작업을 쉽게 하기 위해 제가 사용하는 프로그램과 환경을 정리해봤습니다.


⭐️⭐️⭐️

Homebrew [Mac]

1/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Git, Git-lfs

1# Mac
2brew install git git-lfs
3
4# Ubuntu, RPi
5sudo apt install git git-lfs
6
7# Configure git
8git config --global user.name "Your Name"
9git config --global user.email "you@your-domain.com"

iTerm2 [Mac]

1brew install --cask iterm2

vim

1# In mac, vim is already installed.
2
3# Ubuntu, RPi
4sudo apt install -y vim

{/* wget https://raw.githubusercontent.com/cheesecat47/cheesecat47.github.io/master/assets/etc/vimrc mv vimrc ~/.vimrc git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim vim +PluginInstall +qall */}

zsh & Oh My Zsh

zsh

  • zsh은 최근 맥에서는 기본 쉘로 설정되어 있습니다.
1# Mac. For update zsh.
2brew install zsh
3
4# Ubuntu, RPi
5sudo apt install zsh
6sudo chsh -s `which zsh`

Oh My Zsh

1# oh-my-zsh
2sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
3
4#install zsh plug-ins
5git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
6git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
7git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions

Spaceship-prompt

1git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
2ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
  • 설정을 수정하고 적용합니다.
 1vi ~/.zshrc
 2
 3####################
 4# ...
 5ZSH_THEME="spaceship"
 6# ...
 7plugins=(
 8    git
 9    zsh-autosuggestions
10    zsh-syntax-highlighting
11    zsh-completions
12)
13# ...
14####################
15
16source ~/.zshrc

Docker & Docker Compose

OrbStack [mac]

  • Docker Desktop은 많이 업데이트 되어 다양한 기능을 포함하지만 꽤나 무거운 편입니다. OrbStack은 가벼운 대안이 될 수 있습니다.

VSCode

1# Mac
2brew install visual-studio-code
3
4# Ubuntu
5sudo snap install code --classic

⭐️⭐️

tmux

1# Mac
2brew install tmux
3
4# Ubuntu, RPi
5sudo apt install tmux
  • tmux 테마를 적용합니다.
1cd ~/
2git clone https://github.com/gpakosz/.tmux.git
3ln -s -f .tmux/.tmux.conf
4cp .tmux/.tmux.conf.local .
  • 마우스 동작을 허용합니다.
1vi ~/.tmux/.tmux.conf.local
2
3> set -g mouse on

⭐️

D2Coding [Font]

  • 맥이나 우분투 GUI 모드에서는 링크에서 압축파일을 받아 압축을 푼 후, ttc 파일을 사용해 쉽게 설치할 수 있습니다.
  • 우분투 CLI나 라즈베리 파이를 사용중이라면 아래 방법을 사용합니다.
1sudo cp your-font-file /usr/share/fonts/
2sudo fc-cache -fv
3sudo fc-list | grep "D2Coding"

wget

1# Mac
2brew install wget
3
4# Ubuntu, RPi
5sudo apt install wget

bat

 1# Mac
 2brew install bat
 3
 4# Ubuntu
 5sudo apt install bat
 6
 7# Can't use on RPi
 8
 9vi ~/.zshrc # or bashrc
10> alias cat="bat" # "batcat" on Ubuntu
11source ~/.zshrc

Portainer

1# Docker required
2docker volume create portainer_data
3docker run -d -p 9090:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce

Postman

1# Mac
2brew install --cask postman

httpie

  • Postman의 대안입니다.
1brew install httpie

TablePlus

openinterminal [Mac]

1brew install --cask openinterminal-lite

References

Comments

Link copied to clipboard!