Skip to content

Starship – Cross-shell prompt

Trạng thái GitHub Actions workflowPhiên bản Crates.ioTrạng thái đóng gói
Trò chuyện trên DiscordTheo dõi @StarshipPrompt trên TwitterStand With Ukraine

Website · Cài đặt · Cấu hình

Tiếng Anh   Tiếng Đức   Tiếng Tây Ban Nha   Thiếng Pháp   Bahasa Indonesia   Italiano   Tiếng Nhật   Português do Brasil   Tiếng Nga   Українська   Tiếng Việt   Tiếng Trung giản thể   Tiếng Trung hiện đại

WARNING

The default branch has been renamed from master to main. If you have a local clone, update it by running:

sh
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

Starship with iTerm2 and the Snazzy theme

The minimal, blazing-fast, and infinitely customizable prompt for any shell!

  • Fast: it's fast – really really fast! 🚀
  • Customizable: configure every aspect of your prompt.
  • Universal: works on any shell, on any operating system.
  • Intelligent: shows relevant information at a glance.
  • Feature rich: support for all your favorite tools.
  • Easy: quick to install – start using it in minutes.

Explore the Starship docs  ▶

Yêu cầu

Yêu cầu

Bước 1. Cài Đặt Starship

Chọn hệ điều hành của bạn trong danh sách bên dưới để xem hướng dẫn cài đặt:

Android

Cài đặt Starship bằng một package manager bất kì:

Kho lưu trữHướng dẫn
Termuxpkg install starship
BSD

Cài đặt Starship bằng một package manager bất kì:

Bản phân phốiKho lưu trữHướng dẫn
Anycrates.iocargo install starship --locked
FreeBSDFreshPortspkg install starship
NetBSDpkgsrcpkgin install starship
Linux

Cài đặt phiên bản mới nhất cho hệ điều hành của bạn:

sh
curl -sS https://starship.rs/install.sh | sh

Hoặc là, cài đặt Starship bằng một package manager bất kì:

Bản phân phốiKho lưu trữHướng dẫn
Anycrates.iocargo install starship --locked
Anyconda-forgeconda install -c conda-forge starship
AnyLinuxbrewbrew install starship
Alpine Linux 3.13+Alpine Linux Packagesapk add starship
Arch LinuxArch Linux Extrapacman -S starship
CentOS 7+Coprdnf copr enable atim/starship
dnf install starship
Debian 13+Debian Mainapt install starship
Fedora 40+Coprdnf copr enable atim/starship
dnf install starship
GentooGentoo Packagesemerge app-shells/starship
Manjaropacman -S starship
NixOSnixpkgsnix-env -iA nixpkgs.starship
openSUSEOSSzypper in starship
Ubuntu 25.04+Ubuntu Universeapt install starship
Void LinuxVoid Linux Packagesxbps-install -S starship
macOS

Cài đặt phiên bản mới nhất cho hệ điều hành của bạn:

sh
curl -sS https://starship.rs/install.sh | sh

Hoặc là, cài đặt Starship bằng một package manager bất kì:

Kho lưu trữHướng dẫn
crates.iocargo install starship --locked
conda-forgeconda install -c conda-forge starship
Homebrewbrew install starship
MacPortsport install starship
Windows

Cài đặt Starship bằng một package manager bất kì:

Cài đặt Starship bằng một package manager bất kì:

Kho lưu trữHướng dẫn
crates.iocargo install starship --locked
Chocolateychoco install starship
conda-forgeconda install -c conda-forge starship
Scoopscoop install starship
wingetwinget install --id Starship.Starship

Bước 2. Thiết lập shell của bạn để dùng Starship

Cấu hình shell của bạn để chạy starship. Bạn có thể chọn từ danh sách bên dưới:

Bash

Thêm đoạn sau vào cuối tệp tin ~/.bashrc:

sh
eval "$(starship init bash)"
Cmd

You need to use Clink (v1.2.30+) with Cmd. Create a file at this path %LocalAppData%\clink\starship.lua with the following contents:

lua
load(io.popen('starship init cmd'):read("*a"))()
Elvish

Thêm các dòng sau vào cuối tệp ~/.config/elvish/rc.elv (%AppData%\elvish\rc.elv trên Windows):

sh
eval (starship init elvish)

Note: Only Elvish v0.18+ is supported. Đối với các phiên bản elvish trước v0.21.0 tệp cấu hình có thể là ~/.elvish/rc.elv

Fish

Thêm đoạn sau vào cuối tệp tin ~/.config/fish/config.fish:

fish
starship init fish | source
Ion

Thêm đoạn sau vào cuối tệp tin ~/.config/ion/initrc:

sh
eval $(starship init ion)
Nushell

Thêm những dòng sau vào cuối tệp cấu hình Nushell (tìm bằng cách chạy $nu.config-path trong Nushell):

sh
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")

Lưu ý: Chỉ hỗ trợ Nushell v0.96+

PowerShell

Add the following to the end of your PowerShell configuration (find it by running $PROFILE):

powershell
Invoke-Expression (&starship init powershell)
Tcsh

Thêm đoạn sau vào cuối tệp tin ~/.tcshrc:

sh
eval `starship init tcsh`
Xonsh

Thêm dòng này vào cuối của file ~/.xonshrc:

python
execx($(starship init xonsh))
Zsh

Thêm đoạn sau vào cuối tệp tin ~/.zshrc:

sh
eval "$(starship init zsh)"

Bước 3. Cấu hình Starship

Khởi tạo một shell mới, và bạn sẽ thấy một chiếc shell mới tinh, đẹp lung linh. Nếu bạn hài lòng với cấu hình mặc định thì giờ là lúc mà bạn nên tận hưởng chiếc shell mới của mình!

Nếu bạn muốn tùy chỉnh Starship nhiều hơn nữa:

  • Configuration – learn how to configure Starship to tweak your prompt to your liking

  • Presets – get inspired by the pre-built configuration of others

🤝 Đóng góp

We are always looking for contributors of all skill levels! If you're looking to ease your way into the project, try out a good first issue.

Nếu bạn thành thạo một ngôn ngữ không phải Tiếng Anh, chúng tôi đánh giá cao mọi sự giúp đỡ của bạn trong việc dịch tài liệu của chúng tôi và cập nhật các ngôn ngữ khác. If you would like to help, translations can be contributed on the Starship Crowdin.

If you are interested in helping contribute to starship, please take a look at our Contributing Guide. Also, feel free to drop into our Discord server and say hi. 👋

Cảm hứng

Xin hãy xem qua những công việc này trước đây, những thứ đã giúp truyền cảm hứng để tạo ra starship. 🙏

Tài trợ

Support this project by becoming a sponsor. Tên hoặc logo của nhà tài trợ sẽ được hiển thị với một liên kết dẫn tới trang web của họ.

🔒 Code Signing Policy

Free code signing provided by SignPath.io, certificate by SignPath Foundation.

Code Signing Roles:

Chương trình này sẽ không chuyển bất kỳ thông tin nào sang các hệ thống mạng khác trừ khi có yêu cầu cụ thể của người dùng hoặc người cài đặt hoặc vận hành chương trình.


Starship rocket icon

📝 Giấy phép

Copyright © 2019-present, Starship Contributors.
This project is ISC licensed.