반응형

Updates: December 24, 2024
Contents: multipass 설치 및 Ubuntu 환경 설정

 

Prerequisites (사전 준비)

  • Mac terminal 열기

0. Homebrew 설치하기

Homebrew는 어떤 프로그램이다

먼저 터미널 (혹은 Terminal)로 들어가서,

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

해주면 설치 끝!

 

이후 필요한 어플리케이션들은 homebrew를 통해서 설치하면 된다.

 

1. iterm2 설치 및 세팅

brew install --cask iterm2

 

설치 후 iterm2 실행하고,

command + , = Setting 으로 들어가서

Profiles \ Session \ Status bar enabled 체크

Profiles \ Session \ Status bar enabled 옆에 Configure Status Bar로 원하는 환경으로 세팅

 

2. multipass 설치 및 Linux (Ubuntu) 가상환경 생성

https://klue.tistory.com/75

 

[Mac] multipass 설치 및 Ubuntu 환경 설정

Updates: November 29, 2024Contents: multipass 설치 및 Ubuntu 환경 설정 Prerequisites (사전 준비)homebrew 설치하기https://klue.tistory.com/74 [Mac] 맥북 시작하기Updates: November 29, 2024Contents: multipass 설치 및 Ubuntu

klue.tistory.com

 

아래부터는 zshell setting 입니다

설치가 귀찮을 경우, 아래 사이트에서 따라하면 됩니다

https://github.com/seongho-git/.setting_terminal.git

 

3. Zshell 설치 (Linux 만 해당)

Mac OS와 같은 경우 zshell이 이미 설치되어 있으므로 3번은 생략하면 됩니다

어떤 shell 쓰고 있나 확인은

echo $SHELL

 

zshell version은

zsh --version

 

만약 없다면, (반드시 있는지 which zsh로 확인하고 시작!!)

MacOS

brew install zsh

 

Ubuntu (Devian)

sudo apt install -y zsh

chsh -s $(which zsh)

 

multipass 비밀번호 설정 (필요한 경우)

sudo passwd $USER

 

https://github.com/ohmyzsh/ohmyzsh/wiki/Installing-ZSH

 

4. Oh-my-zsh

Installation (아래 중에 설치되어 있는 방법으로 설치, 하나만 하면 된다는 의미)

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

 

 

5-1. zsh theme (powerlevel10k)

Ubuntu (Devian)

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >> ~/.zshrc

 

MacOS (Homebrew)

brew install powerlevel10k
echo "source $(brew --prefix)/share/powerlevel10k/powerlevel10k.zsh-theme" >>~/.zshrc

 

brew uninstall powerlevel10k

 

대부분의 경우 p10k에서 선호하는 Meslo Nerd 폰트가 없을 것이다

그렇기에, 터미널을 새로고침했을 때 아래와 같은 화면이 나타날 것인데, 일단 y하고 엔터를 누르자

 

그리고 iTerm2나 터미널을 다시 켜주자

command + q (iTerm2 종료하기)

다시 iTerm2 (or 터미널) 실행하기

 

설치한 폰트를 적용하기 위해서는,

iTerm2: iTerm2 → Preferences → Profiles → Text → Font → MesloLGS NF 선택
Apple Terminal: Open Terminal → Preferences → Profiles → Text → Font →MesloLGS NF 선택

 

p10k configure 에서 원하는 설정해주기 (~/.p10k.zsh 복사)

+ context, prompt right에 추가해주고 / left에서 context 제거

/POWERLEVEL9K_CONTEXT_TEMPLATE 에서 with 제거해주고

 

https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#manual

 

5-2. zsh plugins

1) zsh-autosuggestions

MacOS

brew install zsh-autosuggestions

echo 'source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh' >> ~/.zshrc

 

Ubuntu

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

echo "source ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc

 

2) zsh-syntax-highlighting

MacOS

brew install zsh-syntax-highlighting

echo "source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

 

Ubuntu

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

echo "source ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc

 

theme, plugin 모두 세팅한 후 source ~/.zshrc

 

 

alias copy="bat --wrap=never -p"

 

6. Vim, NVim 설치

brew install vim

brew install nvim

 

vim --version

nvim --version

brew list (vim, nvim에서 확인할 수 있음)

 

7. Vim, NVim Setting

은 다음 포스팅에서 알아보도록 합시다


with ChatGPT

Reference

 

외부 공유하실 경우, 출처 반드시 밝혀주시기 바랍니다!

도움이 되셨다면 공감 꾸욱 부탁드립니다👍

반응형

+ Recent posts