DEV Community

Cover image for How to setup Starship Prompt and Zsh on Crostini
Dan
Dan

Posted on • Originally published at onyxcode.net on

How to setup Starship Prompt and Zsh on Crostini

Hey all! I made this guide after getting Starship successfully working on Bash, but zsh would refuse to accept the init script.

Step 0 - Set a custom password

This step is not required if you've already set a custom password for your Crostini container.

Run sudo passwd user, where user is your username.

Step 1 - Install zsh and setting as default shell

...whether it be from your package manager of choice, or from source.

Then, simply run this command to add zsh's binary to /etc/shells:command -v zsh | sudo tee -a /etc/shells

Now, set it as your default shell:chsh -s $(which zsh)

Step 2 - Install Starship Prompt

Run curl -fsSL https://starship.rs/install.sh | bash to start the installation.

To add Starship's init script to your .zshrc file, simply run one last command:echo $(starship init zsh) >> ~/.zshrc

Congrats, you're done!

Enjoy your new beautiful and blazing fast prompt with the power of Rust and zsh!

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay