Usually, I’m using different operations systems. At home, I’m using Windows as a personal PC, macOS as a primary machine for work, and Ubuntu as a dedicated servers where I am hosting my own pet-projects.
At the end of that short guide, you will have this nice-looking Terminal
For now we have WSL2 or simple Terminal for macOS or Ubuntu. The next steps are the same for any of that OS.
Optional! In case you are using Windows and WSL2 I strongly recommend using Windows Terminal from Microsoft Store.
Zsh is a shell designed for interactive use, although it is also a powerful scripting language.
In case you are using Ubuntu (same for WSL2) just execute the following command:
sudo apt-get install zsh
In case you are using macOS execute that command:
brew install zsh
Install Oh My Zsh
Oh My Zsh is a delightful, open source, community-driven framework for managing your Zsh configuration.
Install this framework you could using the following command:
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
After, you will already have a not-bad Terminal with pre-defined configurations by default using Oh My Zsh. But we will move next.
I do not love to spend a lot of time on the manual configuration of Oh My Zsh, so I recommend using Spaceship it is a minimalistic, powerful and extremely customizable Zsh prompt.
We will install it under Oh My Zsh using the following commands:
git clone https://github.com/spaceship-prompt/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1 ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
~/.zshrc and find the line which defines the theme, and set this one:
Restart your terminal or open a new one.
Done! And enjoy!