How to customize your terminal like a developer?

How to customize your terminal like a developer?

ยท

4 min read

Hello, developers! Want a really cool and useful terminal?

Yeah? So let's go make oneeee ๐Ÿƒโ€โ™€๏ธ๐Ÿƒโ€โ™‚๏ธ

Wait wait, I haven't introduced myself yet! Hello again developers, I'm Torham, a back-end developer, a linux user and Python programmer :)

And now what should we do to make an cool and useful terminal?

Change terminal color scheme

As a developer, it is better to have a good color scheme in your terminal so that we can read the texts inside the terminal better.

To change the color scheme of my terminal I use Gogh

Open your terminal and type this command then press ENTER!!!

bash -c "$(wget -qO- https://git.io/vQgMr)"

Or if you are using MacOS, use this command, then press ENTER!!!:

bash -c "$(curl -sLo- https://git.io/vQgMr)"

After pressing ENTER you will see something like this with a long list of themes:

Gogh.png.png

Now you have to enter the number of the theme you want to install or you can use ALL to install all themes!. but I think Flat Remix theme It is better than other themes and you can install it by entering the number 59.

And BOOM, your theme is installed :)

Installing ZSH

After the above step we need to install a better shell, I always use ZSH or Z shell.

To install ZSH on Debian or Ubuntu base systems, you can use the long command below, this command will do all the necessary tasks and change zsh to your default shell.

sudo apt update && sudo apt install -y zsh && chsh -s $(which zsh)

After executing this command, restart your system once and open your terminal again to face the zsh installation process!

ZshellSetup.png

You can complete zsh configuration or just press 2 and exit. Don't worry we will configure it fully in the next steps.

Refer to this link to install zsh on Arch

Refer to this link to install zsh on MacOS

Now it's time to beautify this shell a little!

Installing powerlevel10k theme

Time to install a theme for this almost ugly zsh :)

Just run the following command:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc

You need git to run this command

To install git, run the command related to your system:

Debian or Ubuntu base systems

sudo apt install git

Arch BTW (Better Than Windows)

sudo pacman -S git

To install git on MacOs, take a look at this article

For better performance of this theme, it is better to install one of the Nerd fonts on your terminal

After running the powerlevel10k install command, close and reopen your terminal once to face the installation process.

I leave the theme configuration steps to you to configure it the way you like :)

Create more readability

After doing the above steps, you have a very nice terminal! But this is still not a developer terminal. Let's go make it better!

For better readability let's change the color of texts a little.

Open your .zshrc file and add these lines:

alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias diff='diff --color=auto'
alias tree="lsd --tree"
export LESS_TERMCAP_mb=$'\e[1;32m'
export LESS_TERMCAP_md=$'\e[1;32m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;33m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;4;31m'

Yes, we also changed the readability of some commands :), this also works for the .bashrc file

Also, for more readability, you can change the background color of your terminal to #0C0E14

And change the font to one of the nerd fonts and make it a little bigger

Final result

Let's just look at the before and after

Before:

ls_manpage_before.png

terminal_b.png

After:

man_ls_after.png

terminal_a.png

on_git.png

Final words and suggestions to be more cool

Well, the creation of a nice terminal is almost finished here, but this was only a small part of the configuration that you can apply to the terminal and zsh.

For example, you can use the zsh-autosuggestions plugin to make the terminal better or you can take a general look at zsh plugins and use any one you like

This was my first article on Hashnode. And it was not supposed to be the first specialized article.

I hope you enjoyed the article and your terminal :))

ย