Setting up ZSH on linux with antigen and powerlevel10k
Here is my setup for my shell in linux, I use antigen to manage plugins and Powerlevel10k them by Roman Perepelitsa. All commands assume you are in your home directory.
First things first is to install some dependencies (some others that I always need installed too):
sudo apt install zsh git curl autojump fonts-powerline wget vim
(If your not on Ubuntu or Debian, you can follow instructions here for powerline fonts.)
Remember to change your shell font ot a powerline one, I quite often use MesloLGS now instead of the bundled Powerline fonts noted. Microsoft also make a really nice powerline font now called Cascadia Code, available on GitHub.
Next up is to download the antigen script and added it to a file:
curl -L git.io/antigen > antigen.zsh
Then we need to create our zshrc file and add our configuration to it:
vim .zshrc
And add the following lines, the first two lines are for initiating antigen and pointing to ur antigen configuration file (this can be included within the .zshrc if you wish). The if statement is for pulling in my aliases from a file I add them too, this is of course optional.
Now we need to create our antigenrc
configuration file (these can be added to .zshrc
though I learned this trick on the SANS SEC275 course I just took), then add all your configuration options to the file, for me it just the plugins:
vim .antigenrc
Add the following lines:
I would recommend running zsh now to test everything is configured correctly and now typos, this will also take your through the powerlevel10k setup routine:
zsh
If all of the above works fine and your happy, change the default shell to zsh:
chsh -s /usr/bin/zsh
Log out and log back in for changes to take effect, enjoy your fancy new shell.
Here are links to MesloLGS, one of my prefered fonts and the default powerline fault used by powerlevel10k, ideal for manual installation if your not on Ubuntu or Debian:
MesloLGS Regular
MesloLGS Bold
MesloLGS Italic
MesloLGS Bold Italic