How-to Create a Shell Command Alias on GNU / Linux

July 2nd, 2016 by thelinuxevangelist

Making a Linux Command Alias

Hello Linux User! This Simple Guide Shows You Step-by-step How-to Create and Enable a Shell Command Line User’s Alias on GNU/Linux Systems.

An Alias is meant to Quickly Executing a Command by simply Calling a synthetic Label or Name.

So every time you “call” the Alias Name on a Terminal window your Action will Correspond to the Sequence of Commands Linked to the Label.

This is an essential Zen guide that simply seeks to bring each user to the target in the easiest and quickest way.

How-to Create/Make a Command Alias on Linux - Featured
  1. Open a Shell Terminal emulator window
    (Press “Enter” to Execute Commands)

     - Open Terminal
  2. Edit the Bash User’s Configuration File

    nano ~/.bashrc
  3. Append the Alias Command


    Without Spaces between the “=” like here above…

    alias htdocs="cd /opt/local/apache2/htdocs"

    Then Executing:


    Will Correspond to:

    cd /opt/local/apache2/htdocs
  4. Enabling the New Alias


Share on Tumblr

Tags: , , , , , , , ,

Comments are disabled