Linux distributions have come a long way in the past decade to the point where it is possible today to use Linux without getting into the dark of the terminal (CLI). However, the more you use and learn about Linux, the more you realize that it is inevitable to use the command-line interface. By default, the CLI has a simple interface that gets boring quickly. Luckily, you can illuminate the darkness of the terminal by beautifying it with plugins like Powerline. So what is Powerline? How do you install and configure it?
This article is sponsored by TUXEDOComputers, a German company that produces Linux hardware, notebooks, computers, and more. Always and forever, all ideas and opinions on this website are wholly mine, as my values are not for sale. To learn more, read our Code of Ethics.{alertInfo}
{tocify} $title={Table of Contents}
What is powerline?
Almost every Linux tools include a status line and a prompt. The status line displays information about a program’s current activity, and the prompt lets you input commands. The bash shell, Vim, and i3 window manager are typical embodiments of these concepts.
Powerline is a plugin written in Python that renders status lines and prompts attractively and consistently. It is stable, lightweight, customizable, and supports Zsh, Bash, and Fish shells.
After this dose of knowledge, you should also learn how to install and configure Powerline.
How do you install and configure Powerline?
Installing and configuring Powerline is an easy task that does not require much knowledge or effort, as all you have to do is follow the few simple steps below:
The distribution used is TUXEDO OS, an Ubuntu-based distro, yet, the same steps apply to the rest of the distributions.{alertInfo}
- Install Powerline using the following command line:
Ubuntu & Ubuntu-based distros: sudo apt install powerline fonts-powerline
Arch & Arch-based distros: sudo pacman -Sy powerline powerline-fontsFedora: sudo dnf install powerline powerline-fonts{codeBox}
- Open your shell script file:
Bash: sudo nano (or use your favorite text editor) .bashrc
Zsh: sudo nano (or use your favorite text editor) .zshrc{codeBox}
- Add the following lines to your shell script file:
bashrc:. /usr/share/powerline/bindings/zsh/powerline.zsh{codeBox}
#Powerline
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /usr/share/powerline/bindings/bash/powerline.sh
zshrc:
#Powerline
powerline-daemon -q
- Save the change and exit:
Nano: click Ctrl+O, then Ctrl+X{codeBox}
- To activate the change, restart your terminal (close and reopen it)
- Feast your eyes on the beauty of the Powerline.
Powerline default theme |
Is this not enough to light up the darkness of your terminal? Powerline has more hidden light sources waiting to be discovered by customizing the Powerline configuration file, which we will explore in part II.
If you enjoy reading my blog, consider supporting it: Paypal account: contact@linuxtechmore.com. For more support options contact me.{alertIdea}
Maybe next time leave SELECTABLE TEXT instead of screenshots? I LOVE having to hand-type out a dozen lines of script!
ReplyDeleteWhat? All the codes (selectable text) are under the screenshots and are very clear and can be easily copied. Just focus next time 🙂.
Delete