Fun Friday #60: Aliases


Userlevel 7
Badge +22

Happy Friday everyone!

 

Anyone that’s worked with Kubernetes for some time has probably seen or used aliases for common commands. For those that don’t know what an alias is in this context, it’s creating your own shorter command that executes another binary. For example, typing k to run kubectl.

 

I was on Twitter the other day and saw Mick Douglas commenting on the state of the Microsoft Graph API, which by itself is a good read: 


As I got further in I saw an incredibly funny alias he’d said that he’d created to circumvent his frustration:


And I just thought it was brilliant! Especially when you see it in action:

 

That’s my story for the day! Anyone else got any aliases (funny or otherwise) that have made their lives easier/more bearable?


2 comments

Userlevel 7
Badge +14

It may not save much time, but I often think about creating this alias: nslookup → resolve-dnsname

I like resolve-dnsname much more but nslookup is what I type automatically without thinking about it 🤣

Userlevel 7
Badge +22

Aliases have been around for quite some time. I remember I used to go a bit nuts with them but then would end up in places with a foreign shell and feel like someone cut off my hands :). Now in my twilight years and after the passing of the wild excesses of youth I tend to be more conservative with my aliases, sometimes even staying with the default ones. If you are using bash just go into your .bashrc file and take a peak:

cat .bashrc

You can probably guess which one I added in there!

If you want a quick lesson in the field check this out:
 

https://phoenixnap.com/kb/linux-alias-command#:~:text=Vim%20or%20nano-,What%20Is%20an%20Alias%20in%20Linux%3F,and%20avoiding%20potential%20spelling%20errors.

Comment