How to Make Linux Terminal look Awesome
Last Updated :
27 Jun, 2022
In this article, we will install and configure some themes and plugins to tweak our Linux terminal for better productivity and a fancier look. These features include autocompletion, autosuggestion, command-line search, syntax highlighting, and better support for git and environment managers.
Zsh
The Z-shell or Zsh is a UNIX shell with support for various plugins and themes.
sudo apt install zsh [ Debian/Ubuntu ]
sudo yum install zsh [ RedHat/CentOS ]
sudo pacman -S zsh [ Arch/Manjaro ]
sudo dnf install zsh [ Fedora ]
sudo zypper install zsh [ OpenSUSE ]
Oh My Zsh
It is an open-source and community-driven framework for managing Zsh configuration. It comes bundled with thousands of helpful functions, plugins, themes, and much more.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" [Using curl]
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" [Using wget]
Nerd Fonts
Nerd Fonts is a project to create patched fonts. Nerd Fonts takes popular programming fonts and patches them with a large number of glyphs (icons).
- Download hack font and install it by double-clicking on the .tff file. You can also use any other font but make sure it supports all the icons and glyphs required by powerlevel10k.
- Select Hack Font as the default font.
Powerlevel10k
Powerlevel10k is a theme for Zsh. It changes normal shell commands to colorful commands and emphasizes speed, flexibility, and out-of-the-box experience.
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
- An installation prompt will begin by default, but if it doesn’t run.
$ p10k configure
- Change the default theme to ZSH_THEME="powerlevel10k/powerlevel10k" inside ~/.zshrc.
- Commit the changes by running
$ source ~/.zshr
zsh-autosuggestions
Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- Add zsh-autocomplete to the list of plugins inside ~/.zshrc plugins=( [plugins...])
- Commit the changes by running source ~/.zshrc
zsh-syntaxhighlighting
zsh-syntax-highlighting provides syntax highlighting for the shell zsh. It enables highlighting commands whilst they are typed at a zsh prompt into an interactive terminal. This helps review commands before running them, particularly in catching syntax errors.
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
- Add zsh-syntax-highlighting to the list of plugins inside ~/.zshrc plugins=( [plugins...])
- Commit the changes by running source ~/.zshrc
diff-so-fancy
It is a tool that converts the output of diff utility into a more human-readable form. It improves the development speed by providing a simpler way to compare recent changes. With diff-so-fancy, one can focus on the code quality instead of figuring out what all the + and - mean?
$ npm i -g diff-so-fancy
To integrate diff-so-fancy with git.
$ git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
$ git config --global interactive.diffFilter "diff-so-fancy --patch"
$ git config --global color.ui true
Now, we can simply use the git diff command to view recent changes.
$ git diff
bat
bat is a supercharged version of the native cat command. It includes features like syntax highlighting, git integration, automatic paging, and much more.
sudo apt install bat [ Debian/Ubuntu ]
sudo yum install bat [ RedHat/CentOS ]
sudo pacman -S bat [ Arch/Manjaro ]
sudo dnf install bat [ Fedora ]
sudo zypper install bat [Image Widget OpenSUSE ]
Viewing the content of a file with first cat and then with bat.
fzf
It’s an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.
$ git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
$ ~/.fzf/install
- ctrl + t to navigate through the file system.
yehd- ctrl + r to navigate through older commands.
Similar Reads
How to Make Custom Commands for Linux Terminal? With commands, users can communicate with the operating system via the Linux terminal, a handy tool. Although the terminal has several pre-defined commands, you can improve productivity and optimize processes by writing your custom commands. This article explains how to write and use custom commands
4 min read
How to Open Terminal in Linux? The Shell or Command Prompt are common name for the Linux Terminal. The terminal was designed as a Linux File Browser, and this function is still carried out using it. You may traverse your files and undo changes made by using the Terminal as a File Browser. However, the very first step will be to O
4 min read
How to Customize Linux Terminal Using powerlevel10k? Sometimes we get bored with the normal Linux Terminal and feel like if we can customize the same, so we can use powerlevel10k for that. It is a theme for ZSH. It changes normal shell commands to colorful commands. To install powerlevel10k we need to install Oh My Zsh, both are open-source in GitHub.
2 min read
How to Display Random ASCII Art on Linux Terminal? Here we are going to see how to print the drawing on the terminal in the form of ASCII characters. ASCII-Art-Splash-Screen is a tool written in python that pulls a random drawing from a repository and shows it every time you open the terminal. This works on UNIX-based systems like Linux and macOS.
2 min read
How to Send a Message to Logged Users in Linux Terminal? Linux is a solution to the data center. It is flexible, stable, secure, and reliable. There are many users logged into servers for development purposes, testing, and usage. There are various tools to send messages to other users, but they do not allow widespread sending or sending to specific users
5 min read