# Terminal 꾸미기 | iTerm2 in VSCode(Cursor)

# 1. Terminal

- Mac 환경에서 cmd + space 후 terminal 타이핑하면 실행시킬 수 있음

- CLI 환경으로 git, .py 등 다양한 개발 환경에서 작업할 시 필수적으로 사용하게 되는 툴(window의 powershell)

- 단점 : 불편한 사용성, 경로 파악의 어려움, 이름이 너무 김

![Image](https://upload.cafenono.com/image/slashpagePost/20250224/213827_4nyvz61BA43zRXuwCr?q=80&s=1280x180&t=outside&f=webp)

### 원래 다이어리도 다꾸부터

개발자는 아니지만, 개발자 친구들은 다들 꾸며놓길래...

출처: Hemudi | Hemdi 님의 velog 글을 참조

[iTerm2 설치와 VSCode 터미널 연동](https://velog.io/@hemudi/%EA%B0%9C%EB%B0%9C%ED%99%98%EA%B2%BD-iTerm2-%EC%84%A4%EC%B9%98%EC%99%80-VSCode-%ED%84%B0%EB%AF%B8%EB%84%90-%EC%97%B0%EB%8F%99)

# 2. 준비물 다운로드

>   **✓****  **iTerm2 : 가상 터미널 어플리케이션
>   **✓** Homebrew : macOS 용 패키지 관리자
>   **✓** ZSH : 터미널 shell 환경을 위한 도구
>   **✓** Oh My ZSH : zsh 설정 관리를 위한 프레임워크

## 2-1. iTerm2 설치

**[](https://iterm2.com/index.html)****[→](https://iterm2.com/index.html)****[ ](https://iterm2.com/index.html)**[iTerm2 공식홈페이지](https://iterm2.com/index.html)

[iTerm2 - macOS Terminal Replacement](https://iterm2.com/index.html)

![Image](https://upload.cafenono.com/image/slashpagePost/20250224/215158_VJjkZJQss3rkfRMEyO?q=80&s=1280x180&t=outside&f=webp)

- Download 클릭

![Image](https://upload.cafenono.com/image/slashpagePost/20250224/215256_iLMAEEgL7YZSqKZb2V?q=80&s=1280x180&t=outside&f=webp)

- Move to Applications Folder 클릭 및 기타 사항 Yes 클릭

## 2-2. Homebrew 설치

→ [Homebrew](https://brew.sh/) 공식홈페이지

[Homebrew](https://brew.sh/)

![Image](https://upload.cafenono.com/image/slashpagePost/20250225/143631_vWhoVTuUjyeAHBvF60?q=80&s=1280x180&t=outside&f=webp)

- 홈페이지에서 위의 코드 복사 후 터미널(혹은 iTerm2)에서 붙여넣고 실행

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

- 편의상 Mac OS의 경우 여기서 바로 복사 후 터미널 실행

> **homebrew**는 zsh를 설치하기 위해서도 필요하지만, python에서 venv(가상환경)을 설치하는데에도 사용됨 (pip 설치 및 업데이트에도 필요)

## 2-3 zsh 와 Oh My ZSH 설치

1) zsh 설치는 터미널에서 아래의 명령어 실행

```javascript
brew install zsh
```

2) Oh My ZSH는 아래의 명령어 실행

```javascript
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
```

위의 과정을 전부 완료하면 필요한 툴은 모두 설치 완료.

아래의 단계들은 본격적인 터미널 꾸미기

# 3. 터미널 커스텀

- 테마 변경

- Font 변경

- 이름 변경

## 3-1 테마 변경

### 1) Oh My ZSH 테마 변경

유명하다는 두 테마 agnoster 와 powerlevel10k 중 [안피곤](https://steemit.com/kr-dev/@anpigon/20240604t150432959z)님의 블로그 글을 보고 powerlevel10k가 좀 더 맘에 들어서 결정

[https://steemit.com/kr-dev/@anpigon/20240604t150432959z](https://steemit.com/kr-dev/@anpigon/20240604t150432959z)

![Image](https://upload.cafenono.com/image/slashpagePost/20250225/161009_52mYvPfTzJYMsmSX5Z?q=80&s=1280x180&t=outside&f=webp)

**→ ****[깃헙 ](https://gist.github.com/kevin-smets/8568070)****페이지에서 아래의 경로를 복사 붙여넣기 하면 powerlevel10k 가 복사됨**

```javascript
git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
```

### 2) .zshrc 파일 열기

**.zshrc는 여러 환경 설정값들이 저장되어 있는 파일**

```javascript
vi ~/.zshrc
```

> 키보드 i 로 INSERT 모드로 변경

vi 에디터는 방향키로 이동

9번째 줄의 ZSH_THEME="robbyrussell" →  ZSH_THEME="powerlevel10k/powerlevel10k" 로 치환

ESC로 INSERT 모드 종료

:wq! 로 저장 후 vi 에디터 종료

![Image](https://upload.cafenono.com/image/slashpagePost/20250225/162037_YZLQMfUxVMLXAdk41V?q=80&s=1280x180&t=outside&f=webp)

For the site tree, see the [root Markdown](https://slashpage.com/bayes-think.md).
