Command line for Application alias in Mac OS X

Posted on

Problem :

I’m working on an installer for a project and I’ve written a post-install script that runs the executable for my project after it’s done.

I want to know the command line argument—or if there is a way—to create an alias for the executable so that the alias will be put on my desktop instead of having to navigate to the folder it’s located in.

Solution :

I want to know the command line argument—or if there is a way—to
create an alias for the executable so that the alias will be put on my
desktop instead of having to navigate to the folder it’s located in.

Yes, you can. In the command line/terminal this is known as creating a symbolic link and this would be done using the ln (make links) command. The general format is like this:

ln -s /path/to/source /path/to/destination/symlink

So in your case, you could do something like this:

ln -s /Applications/My_Great_Application.app ~/Desktop/My_Great_Application.app

Leave a Reply

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