How to create a shortcut in Terminal on Mac

I started using Git extensively a couple of weeks ago, and I have found myself typing “ls -la” over and over and over during my day.  So, I thought, “There’s got to be a better way!”  Surely there is a way to create shortcuts in Terminal…

…Well, here it is:

  1. Open Terminal and type nano ~/.bash_profile
  2. After Nano opens, add the following to the .bash_profile document: alias la=’ls -la’
  3. Close Terminal.  Then Reopen Terminal.
  4. Type la

That’s it!

Thanks to this guy for providing this solution.

Posted in

Toby Cryns

Toby Cryns is a freelance CTO, expert WordPress consultant, and teacher.

He offers free advice to improve your freelance biz.

He also publishes small droppings every now and then to twitter.com/tobycryns and twitter.com/themightymo

Follow Toby's contributions on Github and WP.org.