Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've recently switched to a Mac and want to improve my workflow a bit. I often need to run scripts using the terminal that are in several different folders.

How do I create something like Windows shortcuts that launches the Terminal app with it's initial working directory set to a particular folder?

share|improve this question

2 Answers 2

You could write some Applescript and save it as an application.

e.g.

tell application "Terminal"
    do script "cd ~/Clients/Yoyodyne/"
end tell
share|improve this answer

If you want Terminal to start in the same directory each time, the following solution is probably best. If you want multiple different shortcuts for different directories, the above solution is better.

When running Terminal, navigate to:

Preferences > Settings > Shell > Startup

From there, simply tick "Run command: " and type the appropriate terminal command in the box (for example, cd ~/Desktop/ changes to your desktop folder).

Now whenever you start Terminal, it will change to that directory.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.