Setup Zsh + Powerline on Solus

Have you asked yourself ? What is Zsh ? And why should I use it ? If yes, I will answer you briefly.

The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with a large number of improvements, including some features of Bash, ksh, and tcsh. 

Zsh Features
  • The z-command

With the z command, you can navigate to a frequently/recently visited directory just by typing z , followed by the directory name.
  • Auto-completion

You can just type the command, followed by -, then hit tab. This action will then immediately display all of the available options for that command.
  • Auto-correction

In the Z shell, if you make an innocent typo while writing a file location, for example, spell correction is built-in and will automatically detect the typo.
  • Color customization

Zsh add color highlighting to directories. Additionally, the font-weight will be slightly bolder. This is extremely helpful to see what’s a file and what’s a directory.
If you are using Solus and you decided to switch your shell from bash to Zsh. Follow me as I will show you how to Setup Zsh + Powerline on Solus.


Steps
  • Setup Zsh
  1. Install Zsh: sudo eopkg it zsh
  2. Change shell: sudo chsh -s /bin/zsh $(whoami)
  3. Log out and back in again for the change to take effect.
  4. A configuration dialog will be showed up when you open the terminal so read the instruction carefully to configure it depending on your preferences
  • After setting up Zsh let’s make our shell more powerful by installing Powerline.
  • Setup Powerline
  1. Install Powerline: sudo eopkg it powerline powerline-fonts
  2. Add powerline-daemon -q to the zshrc file : 
    echo "powerline-daemon -q" >> ~/.zshrc
  3. Add source /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh to the zshrc file:
echo "source /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh" >> ~/.zshrc
  • Close the terminal & relaunch it.

    Enjoy  Zsh & Powerline 👊.
Djalel Oukid

Science teacher, PhD student, Master degree in Microbial biotechnology , Microbiologist, designer, video editor, podcaster & blogger. linkedin portfolio github

2 Comments

Comments are welcomed and encouraged on this blog. Spam, abusive and off-topics comments will be deleted.Please read our Comments policy before commenting.

  1. Hi, the last command hase a space instead of e in powerline. So it should read:
    echo "source /usr/lib/python3.6/site-packages/powerline/bindings/zsh/powerline.zsh" >> ~/.zshrc

    ReplyDelete
Post a Comment
Previous Post Next Post
Blackview 5G Rugged Smartphone, 6.36 Inch, IP68 & IP69K & MIL-STD-810G, MediaTek Dimensity 800, 8GB+256GB, Sony® IMX582 48MP triple camera, 5280mAh