
WARNING
The default branch has been renamed from master to main. If you have a local clone, update it by running:
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
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.
Yêu cầu
Yêu cầu
- A Nerd Font installed and enabled in your terminal (for example, try the FiraCode Nerd Font).
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 |
|---|---|
| Termux | pkg install starship |
BSD
Cài đặt Starship bằng một package manager bất kì:
| Bản phân phối | Kho lưu trữ | Hướng dẫn |
|---|---|---|
| Any | crates.io | cargo install starship --locked |
| FreeBSD | FreshPorts | pkg install starship |
| NetBSD | pkgsrc | pkgin install starship |
Linux
Cài đặt phiên bản mới nhất cho hệ điều hành của bạn:
curl -sS https://starship.rs/install.sh | shHoặc là, cài đặt Starship bằng một package manager bất kì:
| Bản phân phối | Kho lưu trữ | Hướng dẫn |
|---|---|---|
| Any | crates.io | cargo install starship --locked |
| Any | conda-forge | conda install -c conda-forge starship |
| Any | Linuxbrew | brew install starship |
| Alpine Linux 3.13+ | Alpine Linux Packages | apk add starship |
| Arch Linux | Arch Linux Extra | pacman -S starship |
| CentOS 7+ | Copr | dnf copr enable atim/starship dnf install starship |
| Debian 13+ | Debian Main | apt install starship |
| Fedora 40+ | Copr | dnf copr enable atim/starship dnf install starship |
| Gentoo | Gentoo Packages | emerge app-shells/starship |
| Manjaro | pacman -S starship | |
| NixOS | nixpkgs | nix-env -iA nixpkgs.starship |
| openSUSE | OSS | zypper in starship |
| Ubuntu 25.04+ | Ubuntu Universe | apt install starship |
| Void Linux | Void Linux Packages | xbps-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:
curl -sS https://starship.rs/install.sh | shHoặc là, cài đặt Starship bằng một package manager bất kì:
| Kho lưu trữ | Hướng dẫn |
|---|---|
| crates.io | cargo install starship --locked |
| conda-forge | conda install -c conda-forge starship |
| Homebrew | brew install starship |
| MacPorts | port 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.io | cargo install starship --locked |
| Chocolatey | choco install starship |
| conda-forge | conda install -c conda-forge starship |
| Scoop | scoop install starship |
| winget | winget 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:
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:
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):
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:
starship init fish | sourceIon
Thêm đoạn sau vào cuối tệp tin ~/.config/ion/initrc:
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):
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):
Invoke-Expression (&starship init powershell)Tcsh
Thêm đoạn sau vào cuối tệp tin ~/.tcshrc:
eval `starship init tcsh`Xonsh
Thêm dòng này vào cuối của file ~/.xonshrc:
execx($(starship init xonsh))Zsh
Thêm đoạn sau vào cuối tệp tin ~/.zshrc:
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. 🙏
denysdovhan/spaceship-prompt – A ZSH prompt for astronauts.
denysdovhan/robbyrussell-node – Cross-shell robbyrussell theme written in JavaScript.
reujab/silver – A cross-shell customizable powerline-like prompt with icons.
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:
- Reviewers: Astronauts
- Approvers and Authors: Mission Control
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.
![]()
📝 Giấy phép
Copyright © 2019-present, Starship Contributors.
This project is ISC licensed.