Linux Command Line Aliases

Ok, you have to promise not to make fun of me if you’re going to continue reading. You promise? Pinky swear?

Alright then, here we go. Somehow or another, I managed to avoid knowledge of command aliases in Linux for over 13 years! I’m gonna give you a moment to let that sink in.

That’s comparable to using a web browser for years, but not knowing about bookmarks. Yes, I know those people exist, but I am not one of them. I have cursed their kind more times than I can count. (I DO NOT miss tech support)

I cringe to think of all the wasted keystrokes over the years. If I could get those back I could…… well I don’t know what, but it’s probably awesome.

If I can save just one person from typing “ls -la” over and over and over again, then this post has earned it’s keep. Here is what I’ve learned:

  • To show all aliases, just type alias
  • To create an alias, use this format alias name='command'
  • For example: alias la='ls -la' would allow you to simply type “la” instead of “ls -la”.

F-A-N-T-A-S-T-I-C!!!

Now imagine my surprise the next day when all of my aliases were gone. Here’s a picture of me when it happened:
Sad Panda

I googled up the answer for Debian, which was to add the aliases to my .bashrc file in my home directory. However, when I went to do that, I found this:
[note color=”#DDD”]/home/user/.bashrc

[/note]

I did as it suggested and created the file .bash_alises, and put my aliases there. After logging out and back in again, they took effect.

Happy Panda

Category(s): Googling for Answers, Linux
Tags: ,

Leave a Reply

Your email address will not be published.

* Copy this password:

* Type or paste password here: