Starship 설치 방법: macOS/Linux에서 starship.toml 설정 및 zsh/fish 연동

Starship 설치, starship.toml 설정, zsh/fish에서 크로스 셸 프롬프트 활성화.

터미널에서 Git 브랜치, 경로, 명령 시간을 한눈에 보려면 기본 PS1은 부족한 경우가 많습니다. Starship은 Rust 크로스 셸 프롬프트로 zsh 또는 fish에 한 줄로 연결하고 설정은 ~/.config/starship.toml에 둡니다. macOS/Linux 공식 설치와 첫 설정을 hereink 독자용으로 정리합니다.

검색어는 macOS/Linux에 Starship 설치하고 zsh/fish 설정하기. 바이너리 설치, init 줄, starship.toml 편집까지 다룹니다.

설치brew · install.sh · cargo
설정~/.config/starship.toml
Shellzsh · fish · bash

Starship이 해결하는 것

수동 PS1보다 유지보수 쉬움

모듈(directory, git_branch, cmd_duration)을 TOML로 관리. 셸 스크립트 없이 테마 변경.

셸 간 동일한 모양

macOS zsh, 원격 bash, 로컬 fish 모두 같은 starship.toml로 일관된 프롬프트.

공식: starship.rs. starship --version으로 확인.

macOS/Linux 설치

  1. 1
    macOS(Homebrew)

    brew install starship. which starship, starship --version.

  2. 2
    Linux 패키지

    Debian/Ubuntu: 공식 저장소 추가 후 apt install starship. Fedora: dnf install starship. Arch: pacman -S starship.

  3. 3
    설치 스크립트

    curl -sS https://starship.rs/install.sh | sh. ~/.local/bin을 PATH에.

  4. 4
    cargo(선택)

    cargo install starship --locked.

zsh / fish 연결

# zsh — ~/.zshrc
eval "$(starship init zsh)"

# fish — ~/.config/fish/config.fish
starship init fish | source

# bash — ~/.bashrc
eval "$(starship init bash)"

저장 후 새 터미널 또는 source. PATH 확인.

~/.config/starship.toml 편집

모듈역할예
[directory]현재 경로truncation_length = 3
[git_branch]Git 브랜치symbol = " "
[cmd_duration]느린 명령 시간min_time = 500
format모듈 순서format = "$directory$git_branch$character"
맞음
zsh/fish 일상 개발, Git 저장소 이동.
안 맞음
레거시 PS1 필수 점프 호스트; Nerd Font 불가.
starship을 찾을 수 없음?

PATH에 없음. Homebrew shellenv 또는 ~/.local/bin export.

Oh My Zsh와 충돌?

ZSH_THEME 비활성화, starship init만 유지.

설정이 반영 안 됨?

~/.config/starship.toml 편집 확인. starship config 사용.

터미널 정리 후 한 장에

서비스 경계는 한 그림이 낫습니다. 공간 만들기.

지금 시작