Manage multiple commands in one Terminal window

Apr 19, '02 09:45:20AM

Contributed by: osxpez

The powerful command-line 'screen' utility (see this hint for help installing screen) can handle multiple "windows" within the same screen session. It's quite like tabbed browsing in Mozilla or the way kterm works in KDE.

To create a new window you press "Ctrl-A c". To cycle forward through the list of windows use "Ctrl-A n"; backward is "Ctrl-A p", and "Ctrl-D" to terminate the screen. Assuming you have 'screen' installed, here's a quick example:

 % screen top
[Ctrl-A c]

% screen man tcsh
[Ctrl-A c]

% man screen
[Ctrl-A n] [Ctrl-A p] [Ctrl-A n] etc
[Ctrl-A n] until 'top' is onscreen
q [Ctrl-D]
[Ctrl-D] etc...
Or something along those lines. You don't need tabbed terminal apps after all. =)

Yes, this is documented in screen's man pages. But it's one huge man page and I thought maybe you'd be more inclined to read it if you knew great stuff like this are hiding there.

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020419094520817