Wednesday, May 5, 2021

How to best set up command aliases on Linux

Used frequently, bash aliases can make working on the Linux command line a lot smoother and easier, but they can also be complicated and hard to remember. This post examines how you might make your aliases work for you rather than vice versa.

In general, aliases are especially good for:

  • simplifying commands that are long and overly complex
  • remembering commands with odd or complicated names
  • saving time using commands that you use very often

What you need to keep in mind is that:

  • aliases can themselves be hard to remember
  • giving an alias the same name as a regular command can be a good thing or a bad thing (more on this shortly)

How to create an alias

Use the alias command and remember to add it to your ~/.bashrc file so that it will still be waiting for you whenever you login.

To read this article in full, please click here


Thanks to Sandra Henry-Stocker (see source)

No comments:

Post a Comment