How to Create a Shell Command Alias on GNU / Linux

July 2, 2016 | By the+gnu+linux+evangelist | Filed in: Tutorial.

Making a Linux Command Alias

You are Welcome! 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 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


Tags: , , , , , , , ,

QuickChic Theme • Powered by WordPress