How do I create a terminal shortcut to open to a particular folder?

4

1

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?

Michael Prescott

Posted 2009-08-27T14:23:21.633

Reputation: 3 351

Answers

2

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.

Fizwidget

Posted 2009-08-27T14:23:21.633

Reputation: 21

2

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

e.g.

tell application "Terminal"
    do script "cd ~/Clients/Yoyodyne/"
end tell

Richard Hoskins

Posted 2009-08-27T14:23:21.633

Reputation: 10 260