5

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?

2 Answers 2

5

alias if you're using Bash.

3
  • the problem is that it resets everytime I close and open Terminal. Is there a way to make it permanent?
    – Tam
    Apr 9, 2010 at 4:37
  • 3
    Put the alias into your .bashrc.
    – WhirlWind
    Apr 9, 2010 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. Aug 14, 2012 at 21:47
0

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

You must log in to answer this question.

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