Ubuntu

Install and Configure Oh My Zsh and use it in VSCode in Linux

If you use the simple Bash Terminal in your OS, you may want to give Zsh a try to use a faster and safer terminal with many more features. The simple Bash that exist in the common dist of Linuxes are not changed over years and just received some security fixes, but the community behind Zsh are improving it everyday and bring new useful plugins.

I use ‘Oh my Zsh’, Oh My Zsh is an open source, community-driven framework for managing your zsh configuration.

Installing it is easy, here we go:

First we install zsh itself:

And then ‘Oh my Zsh’ framework

Via Curl:

Or via Wget:

During installation it will ask you if you want to make it your default terminal and you may answer yes.

Install the requirments:

Configure Oh My Zsh

You can configure Oh My Zsh to change how it update (Automate or asking), Enable/Disable Plugins, Setting Default user etc. Here is part of changes I’ve made, I’ve enabled some plugins and uncommented/changed some settings:

Installing Theme

There are many plugins installed by default, but I’ve found this nice theme that comes with some nice features and looks pretty useful:

And then configure the theme in your ~/.zshrc file:
ZSH_THEME=”agnosterzak”

Change the default terminal in VSCode

Ok so by now we have installed and configured Zsh and set it as default but still VSCode use the default Bash as the integrated terminal. So we want to change it to Zsh, but there are a problem, VSCode only support monospace fotns and cannot use the power-fonts we have installed. so we have to install some compatible fonts first:

Now we can configure VSCode to use Zsh, Add the following lines to settings.json of VSCode or find them one by one in settings and apply them:

Leave a Reply

Your email address will not be published. Required fields are marked *