DEV Community

Daffa Haj Tsaqif
Daffa Haj Tsaqif

Posted on

Make Your Linux Terminal Enjoyable to Use

At some point, we as Linux users or even Mac need to use a terminal at some point, whether to install something or do a software engineer task, or whatever it is. but you know, the terminal is boring and often becomes the main point of why people are afraid of Linux in general.

"Oh oh, it's scary, it's hard to use, I don't know these commands and stuff"

No more scared of terminals or using boring terminals that are a pain to use

I can't help with the scary commands because I think that's something that we need to learn along the way, but I guess I can help to make it a bit more bearable.

Okay, let's go!

Warning: this stuff needs quite a bit of resources compared to your stock one of course, so if your PC is a real potato you might want to back off a little bit I'm sorry

Ditch Bash to Use ZSH

Dont uninstall of course are you crazy? just add a new shell for your computer, we are going to install zsh to enable us to add fancy toys.

Mac users rejoice because iirc you guys have it by default

first, the installation is like the usual in your terminal, I use an Arch-based Linux distro, so it is going to be

sudo pacman -S zsh

If your shell doesn't change to zsh, type zsh then you should have something like this, standard zsh.

Standard zsh

OH...MY...ZSH!!

After this you going to visit Oh-My-Zsh which is where the magic will happen.

Oh My Zsh is an open-source, community-driven framework for managing your zsh configuration.

To install it you can use curl, wget, or fetch. I usually go with curl, so it's simply

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

After that, it will do its thing like moving your old zshrc to zshrc.pre-oh-my-zsh or some other thing but then you can have your zsh ready to go, and looks good.

Example of OMZ-Infused Zsh

you can check around the documentation, change the theme, add provided plugins on to your zshrc.

Custom Plugins

This is gonna be the main sauce, custom plugins, personally, I have 4 installed on my setup.

Syntax highlighting

This one helps you to syntax highlight your shell commands, giving clarity, and maybe help spot mistakes like missing quote opening.

git clone --depth 1 "https://github.com/zsh-users/zsh-syntax-highlighting.git" $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting

Auto Suggestion

This is different from autocomplete since it suggests based on your previous commands, quicker if you want to use the command you used before

git clone --depth 1 "https://github.com/zsh-users/zsh-autosuggestions.git" $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions

Autocomplete

This one is probably still underutilized in my end but it's simply the most powerful plugin there

git clone --depth 1 "https://github.com/marlonrichert/zsh-autocomplete.git" $HOME/.oh-my-zsh/custom/plugins/zsh-autocomplete

History Substring Search

This is quite difficult to explain, the best I can explain is I can type git then I press up-arrow then it going to present me with my history git command I do, I use it extensively when I want to make a script or documentation.

git clone --depth 1 "https://github.com/zsh-users/zsh-history-substring-search" $HOME/.oh-my-zsh/custom/plugins/zsh-history-substring-search

Custom theme

This one is not needed if you already like the theme they have, but if you like me who I WANT MORE!! You can use powerlevel10k

This one is like a framework by itself so I will leave the git repo instead https://github.com/romkatv/powerlevel10k?tab=readme-ov-file

KABLAM!

Image description

There's more??

To be honest, we can go more, but some of this needs us to use a terminal often

"Alias" for example, is just a bunch of commands that we use often but too long, so we make short and easy-to-remember aliases so we can reduce our type or just make it easy to remember

These are some of the popular aliases there, provided excellently by Marius Colacioiu

This one is mine, saved as .aliases.sh then sourced it on my zshrc

Image description

What else??

What else we can add?? I guess it depends on our imagination no? Let me know in the comments what can I add here.

Cheers

EDIT: adding credit to the gist provider

Top comments (26)

Collapse
 
greenteaisgreat profile image
Nathan G Bornstein • Edited

Oh My Zsh is the de facto for a lot folks these days, but I think the creators have been radio silent on any updates/PR's and aren't actively maintaining it. My fav framework for Zsh is Zim. Super fast, modular and the themes it comes with are p cool (sorin is my current theme).

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

I don't know I still got an update today and the commits are still active if I see it.

but I will take a look at Zim anyway, thx.

Collapse
 
greenteaisgreat profile image
Nathan G Bornstein

You're absolutely right. I just looked it up and it's community maintained rather than the person who created it. I needed to do more research when I saw "the owner isn't maintaining it anymore" and not make assumptions 😅

Thread Thread
 
dhupee profile image
Daffa Haj Tsaqif • Edited

once project is big enough one man cant even handle it alone i guess, Robby Russell the creator also has his own company so it's hard to keep an active hand there, but he still oversee it from my quick github search

Collapse
 
proteusiq profile image
Prayson Wilfred Daniel

How did you add GitHub markdown? It is super cool 😎

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

the github gist? there's a documentation to make one {% gist <LINK> %}

Collapse
 
moopet profile image
Ben Sinclair

The font-size is too small. Did you use any special markdown around it or just the embed code? Otherwise we should put a bug report in!

Thread Thread
 
dhupee profile image
Daffa Haj Tsaqif

I just embed the github I found, it's not even mine to be honest I think I've typed the owner

And no, no special markdown I'm not that smart

Collapse
 
proteusiq profile image
Prayson Wilfred Daniel

Nice 👍 Thank you. Do you have the link to documentation?

Thread Thread
 
dhupee profile image
Daffa Haj Tsaqif

Idk about links, but the guide is in the right side "create post" page, pretty sure you can see there

Collapse
 
tduyng profile image
Tien Duy

No one talks to Warp terminal? It's so good.

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

Warp is mac only at the moment so i cant speak anything about it but when i saw "pricing" and if what they said is true about needing an account and internet access, I dont know

i will check around in youtube i guess

Collapse
 
mightycoderx profile image
MightyCoderX

I actually enjoy using just bash. I'm on a fresh, minimal installation so I don't wanna install too much stuff, and once customixed a bit it can be nice too!

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

minimalist sometimes always better to some people, if you dont want it nor need it dont use it, simple right? :)

no need to be "oh its trendy i need to use/try it" nah nah

Collapse
 
koisose profile image
koisose

keren tapi masih setia sama fish

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

selama suka gak usah ganti gak papa

Collapse
 
dreyfus92 profile image
Paul Valladares

amazing post, thanks for sharing 😁

Collapse
 
xem0n profile image
Xem0n

what about tmux?

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

Tmux is very good especially if you use it on server but I haven't used it for my own use yet so I can't write something I don't know

Collapse
 
dreamhollow4219 profile image
Ian

I know I'm probably a weirdo but I actually quite enjoy using Bash.

I can see the value in other shells, but I'm a sucker for tradition.

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

If you enjoy it keep using it, no need for FOMO

Collapse
 
denis99455553 profile image
Denis

fzf

Collapse
 
dhupee profile image
Daffa Haj Tsaqif

oh yeah i forgot to add that, but maybe i'll make a list special for "tools"

Collapse
 
brucehankins profile image
Bruce Hankins

Have you tried fish and oh-my-fish? Or fish and powerline? I feel like zsh is over hyped, I know some people think fish is a useless shell, but it fits perfectly for me.

Collapse
 
dhupee profile image
Daffa Haj Tsaqif • Edited

I tried Fish, when I used it first time on my Pop OS installation back when I explore Linux for the first time, but the script is quite different compared to bash/zsh that's why i don't use it.

Also i have too many automation scripts that makes it pain to migrate anyway

Some comments may only be visible to logged-in visitors. Sign in to view all comments. Some comments have been hidden by the post's author - find out more