Why BASH aliases are awesome!

Recently, I’ve been playing around with different shells such as zsh, bash and fish and I’ve settled on the default bash shell. For those of you who aren’t aware, BASH or GNU BASH is a UNIX shell command language. It has been around for more than 28 years and it is used as the default shell in nearly all Linux distributions. This article will be about my experiences with bash aliases and how it has impacted my workflow.

My main uses for bash aliases

I mainly use them for moving them between directories and executing commands that have lots of flags. For example, it is painful when you have to switch between /usr/share/themes and then into another folder with four subfolders preceeding it. Instead, I would have it binded to a command of which I can execute. For example, if I wanted to switch from /insert/long/path/here/please to ~/Documents/Java-Prog/hello-world, I would have it setup as a bash alias. I may just type javp to take me to Java-Prog and then I can cd into my desired directory from there.

To execute that long screenfetch command – `sf -n -d '-host;-uptime;-kernel;-shell;-cpu;-gpu;-mem'– I didn’t want to type that out every time I wanted to execute it so instead, I made a bash alias that could be easily remembered. When I execute sf, I get the regular output of screenfetch so if I want a more minimal screenfetch, I type sfm. It’s like saying, give me screenfetch (sf) and give my screenfetch minimal (sfm).

What’s the point?

It’s purely meant to save time – it also makes you look like a pro if that’s what you’re after. :^)

Want my .bashrc?

Click here to view the .bashrc file. You can copy it or replace your existing one with this one.

Leave a comment

Your email address will not be published. Required fields are marked *