How to create bash alias in your Mac OS Terminal 2016?

How to create bash alias in your Mac OS Terminal 2016

How to create bash alias in your Mac OS Terminal 2016

Today, we are going to teach you on how to create bash alias in your mac os terminal in an easy way. If you’re wondering why do we need to add alias in our mac terminal, you will think that we don’t need it and its hard to add sort of that.

For me, as a developer, adding shortcut using alias can give you easy way to navigate to any directories or opening up your vagrant homestead for development or checking your files which can be sort from big bytes to small size and for me, it lessen up my time finding this command cause i can put an alias shortcut and just type that alias and it will work like magic.


Okay, so lets get back to what we’re doing already,

1. First fire up your

2. In your terminal type,

– This command will open a text editor and you can start adding your aliases

3. For this example, i will put alias for my XAMPP htdocs so i can access it right away.. type this in the editor

4. Now, close your terminal app and open it again so you can use your created alias shortcut.
From our example we just need to type “htdocs” and it should change the directory the XAMPP htdocs file..

5. If you type your alias in your terminal and you see this error..

6. You can try this, open up your and type this command

once it open up, please check if you don’t see this line of code below, paste it there and it closed again your terminal and your alias should work already.

Thats it guys, hope this helps you.. if you have problem.. just comment out below and I’m willing to help you..


Other Alias that i’ve been using, and you can used it too.. just type this in your ~/.bash_profile



1. Show and Hide Files

2. Check File System Size


3. Using Git alias

4. Running HTTP server for fast development, using python

I found some great collections of bash alias on github gist you can check them all here..

Mac OSX Bash Profile by natelandau

See it all here:

Some codes snippets are:



7413 Total Views 21 Views Today
Anthony Pillos

About Anthony Pillos – We are Awesome. Tutorials in different programming languages like PHP,HTML5,JAVASCRIPT,CSS/CSS3,JQuery,Jquery Mobile, Responsive Design.

7414 Total Views 22 Views Today

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">