Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to a shortcut command in Mac as I frequently call commands that are a bit long in Terminal. How can I do that?

share|improve this question

migrated from stackoverflow.com Apr 10 '10 at 19:03

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

alias if you're using Bash.

share|improve this answer
    
the problem is that it resets everytime I close and open Terminal. Is there a way to make it permanent? – Tam Apr 9 '10 at 4:37
3  
Put the alias into your .bashrc. – WhirlWind Apr 9 '10 at 4:40
    
Or a function, depending on how complicated the shortcut in. Aliases are simple text substitutions. functions can have parameters and code behind it. But functions require some simple shell coding knowledge. – Rich Homolka Aug 14 '12 at 21:47

Save it as a .command but you may have to tamper around with the visibility settings.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .