Manage & Resume Multiple Terminals Easier with Window Groups in OS X

Dec 9, 2013 - 7 Comments

Saved and restored Terminal window group with commands

Do you have your terminal windows arranged in a particular way, perhaps running particular processes, that you want to consistently resume to without having to rearrange and relaunch things? Rather than relying entirely on the OS X Resume feature, you should use the Terminal app “Window Groups” tool, which lets you save not only the placement of groups of terminal windows, but also their commands and processes. These can be quickly resumed to at any time, making it simple to manage specific window configurations and workflows for specific command line tasks. This feature has been around in Terminal app on the Mac for quite some time, but it goes largely ignored even by the most advanced command line users. Fortunately, it’s extremely simple to configure and to use, and once you get accustomed to it, you’ll wonder how you ever functioned in Terminal without it.

Save their precise placement in a “window group” and you’ll be able to quickly resume productivity, right where you left off:

Saving a Group of Terminal Windows Placement & Commands

Got a set of terminal windows and commands that you use frequently? Save it as a group:

  1. Organize Terminal windows on screen as desired
  2. Optionally; run desired commands for each terminal window that you want to resume to
  3. When finished, pull down the “Window” menu and choose “Save Windows as Group”
  4. Save terminal windows placement as a group

  5. Name the window group, and check the box for “Restore all commands”
  6. Save terminal window group with commands

If this is going to be a frequently used placement of windows and commands, you may want to check “Use window group when Terminal starts” as well, which sets a Terminal app specific restore functionality upon each launch, going beyond the default restoration and resume functions of OS X.

Restoring Terminal Window Groups

Ready to restore to a specific terminal group?

  1. Back in Terminal app, pull down the “Window” menu and go to “Open Window Group”
  2. Select the choice you want to quickly resume to

Resume and restore terminal window groups in OS X

That’s all there is to it. Assuming you used the “Restore all commands” preference option, everything will be pretty much where you left off. If you’re going to use Terminal Window Groups for reconnecting to remote servers, be sure you have SSH keys configured so that the connection becomes automatic without having to enter passwords and login details, otherwise you’ll need to continuously authenticate with each resume of a window group that has remote sessions.

Saved and restored Terminal window group with commands

Get specific with this and you can have a terminal window group defined for completely different tasks, or for different times of day. For example, you may have a routine group of windows used for a specific set of tasks with a particular placement and set of commands running, like a large lynx browser on half the screen, with nettop monitoring network traffic in one corner with an active SSH connection to a remote server – save that as a window group and you can instantly resume not only the placement, but also those commands themselves, anytime, just by selecting that saved window group.

Another great perk to specific Window Groups? They work even if you have the system-wide Window Restore feature turned off in OS X. Give them a try, you’ll be more productive.


Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks


» Comments RSS Feed

  1. Tony says:


    When I try to save a window group, It doesn’t give me the option to restore all commands etc. The only option given is use window group on startup. And then the group opens up as all new terminals.

    I am using mac OSX 10.6.8. Was this feature added on only after Snow Leapord?

  2. Mike says:

    Ugh. You should just use iTerm2.

  3. Jeremy says:

    Great article. But when I restore a Window Group, I’m not being automatically logged back into my remote sessions. I am able to ping the remote server, and I do have my ssh keys setup. Any ideas why this doesn’t work still?

    • Jeremy says:

      Another piece of information…

      When I restore my Window Group, it doesn’t even attempt to re-login to the remote servers. It just comes up as a new terminal session.

      • Ben Greene says:

        Use the remote login option in the terminal menu.
        shell-> new remote connection (and then specify the ssh command you want). That way when you restore it also logs you into the remote server and runs the command you want… e.g. remote top, etc.

  4. jmav says:

    How do you restore tabs or windows working directory i you use custom shell?
    I use: /opt/local/bin/bash -lhi

Leave a Reply


Shop on and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site