[
daniel
]

<Blog />

<Portfolio />

<Contact />

All articles

Terminal setup

December 11, 2025 · Updated on December 11, 2025 · coding
Blog article image cover

Here’s how I customize my Ubuntu terminal with zsh, oh my zsh, and a couple of plugins.

Install zsh

sudo apt install zsh -y
  • -y is short for --yes and it automatically answers “yes” to all prompts during the install.
zsh --version # zsh 5.9 (x86_64-ubuntu-linux-gnu)

Make zsh the default shell

chsh -s "$(which zsh)"

Close the terminal (or log out) and come back so the login shell change takes effect. If you skip the restart you’ll still fall back to bash.

Install oh my zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Oh My Zsh is essentially a curated collection of configuration defaults, plugin hooks, themes, and helper functions that keep your .zshrc simple. The installer creates ~/.oh-my-zsh plus a default .zshrc.

Add syntax highlighting and autosuggestions

Oh My Zsh exposes a $ZSH_CUSTOM folder meant for custom plugins. We can drop two essentials there:

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ "${ZSH_CUSTOM}/plugins/zsh-syntax-highlighting"
git clone https://github.com/zsh-users/zsh-autosuggestions \ "${ZSH_CUSTOM}/plugins/zsh-autosuggestions"

Then edit .zshrc and enable them:

plugins=( git zsh-autosuggestions zsh-syntax-highlighting )

Reload the shell (source ~/.zshrc) and you’ll get instant syntax colors plus ghosted suggestions while typing.

Add the Spaceship theme

Spaceship is a clean, information-dense theme. Install it into the custom themes directory and symlink it so Oh My Zsh can find it:

git clone https://github.com/denysdovhan/spaceship-prompt.git \ "${ZSH_CUSTOM}/themes/spaceship-prompt"
ln -s "${ZSH_CUSTOM}/themes/spaceship-prompt/spaceship.zsh-theme" \ "${ZSH_CUSTOM}/themes/spaceship.zsh-theme"

Update .zshrc:

ZSH_THEME="spaceship"

Restart the terminal and you’ll see the new prompt with Git status, node versions, and other context.

Add the legendary z command

The z script tracks your directory history so you can jump to frequently used folders with a fuzzy match.

sudo mkdir -p /usr/local/etc/profile.d/ && \ sudo curl -fsSL https://raw.githubusercontent.com/rupa/z/master/z.sh \ -o /usr/local/etc/profile.d/z.sh

Source it from your .zshrc:

if [ -f /usr/local/etc/profile.d/z.sh ]; then . /usr/local/etc/profile.d/z.sh fi

After a bit of navigation history I can run z blog and instantly land in ~/repos/daniel/blog.

Tips

  • Open your terminal preferences and enable “Run command as a login shell” so .zshrc runs for GUI terminals.
  • Keep your .zshrc in a dotfiles repo and symlink it to ~/.zshrc to sync across machines.
  • Whenever you add plugins or theme tweaks, re-run source ~/.zshrc to check for errors immediately.
© 2016–2026 Daniel Constantin. All rights reserved.