MacOS: Opening a Terminal from a folder in Finder (plus, taking and annotating screenshots)

In Windows I like that you can Shift-Rightclick in Explorer and select “Open command prompt here”. During development I often want to do the same on my Mac, and this feature is provided too, but not enabled by default. To turn it on, go to System Preferences > Keyboard > Shortcuts, select Services on the left, and then check the option “New Terminal at Folder”:

If you want to go in the other direction, you can easily open a Finder at your current folder in Terminal by running ‘open .’

A couple of bonus tips:

  • To take full screen screenshot on the Mac, press Shift-Cmd-3. A file will be saved on your desktop. To take a screenshot of a selection of the screen, press Shift-Cmd-4, then drag to outline your selection.
  • In the Preview app, there’s a neat feature under Tools > Annotate where you can annotate your screenshots with highlighted sections, boxes, arrows, text etc. Just open your screenshot file in Preview, and then you can easily annotate and save the image:

tmux useful commands

tmux is a great alternative to screen if you’re looking for multiple virtual sessions in one terminal window.

Useful commands:

Ctrl-b c : open new session

Ctrl-b n | p : cycle next / previous through sessions

Ctrl-b % | ” : split horizontally / vertically

Ctrl-b left | right | up |down : cycle back /forward through visible split windows (left/right if split horizontally, up/down if split vertically)

Using Putty SSH, if you’re not getting line characters for the splits, change session charset to UTF8.