Adding a Bash Script to Mac OS X Dock

This is more painful than it should be, but if you are interested in placing a Bash script in the Mac OS X Dock, follows these steps. You can’t simply just drag a *.sh file to the Dock for some reason; however, if you rename the file to have the *.command suffix, then you can. This will open a separate terminal window.

[code language=”bash”]

mv foobar.command


You will likely want to edit the icon as well, so it is more recognizable. This seems a bit finicky as well, but simply open an *.ICNS file, select all / Ctrl+a, and copy / Ctrl+C. Now, right+click on the *.command script, select “Get Info”, select the existing icon in the upper left of the resulting window, and paste / Ctrl+v. It should update.


  1. I am now not positive where you’re getting your info, however great topic. I must spend a while studying much more or figuring out more. Thank you for magnificent information I was looking for this information for my mission.

  2. I reckon something really special in this web site.

Leave a Reply

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