How to Make/Create Terminal/Command Line Alias on Mac and Linux

April 3, 2012 | By Duchateaux.

The Terminal Command Aliases are Very Useful to Register the Long, Repeated or Complicate Commands.
They are meant to Quick Executing Commands 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.

  • The User Aliases are Defined inside the ~/.bashrc, ~/.profile, ~/.bashrc, ~/.shrc, ~/.cshrc.

  • The System Aliases instead are Define into the /etc/bashrc, /etc/profile, /etc/bash.bashrc Files.

Generally the definition of an Alias can be Resumed with:

$ alias ALIASNAME="COMMAND'S SEQUENCE"

And it execution with:

$ ALIASNAME

will Correspond to execute:

$ COMMAND'S SEQUENCE
Howto Install Firefox Nightly on Linux:
Firefox Nightly on Linux Distros
    Examples:

  1. $ alias htdocs="cd /opt/local/apache2/htdocs"

    So that executing in Terminal our custom “htdocs” command will Correspond to:

    $ cd /opt/local/apache2/htdocs

  2. 2)

    $ alias mate="/Users/daveall/bin/mate"

    So our defined command “mate” will be a shortcut than will bring to open the Textmate application.

How to Set Terminal Command to Run on System Start-Up:
To Use an Alias Before Rebooting the Configuration File Need to be Reloaded…To Activate a Command Alias you Need to Load the Source File with:

source
How to Create an Application Launcher for Easy-Starting on Linux:

QuickChic Theme • Powered by WordPress