Terminal Tips and Tricks
After you’ve used Terminal awhile, you may feel ready for a few of these power tips.
Switching Windows
You can switch among your various Terminal windows by pressing
-1,
-2, and
so on (up to
-9). You’ll be able to identify the windows easily if you choose to include
the Command key in the title bars (use the Window section of the Terminal
Inspector).
Default .term File
After you’ve changed Terminal’s preferences, it’s not easy to get the factory settings back—unless you first save them in a .term file.
If you’ve already made changes to your Terminal’s preferences, quit Terminal and temporarily remove its property list (preferences) file, called com.apple.Terminal. plist, from your Home folder→Library→Preferences folder. Drag it out of the Finder window to the desktop, for example.
Next, reopen Terminal, where you’ll find that all original settings have been restored. Save this window as a .term file named Default (see Section 15.5). Finally, quit Terminal and replace the newly created property list file (com.apple.Terminal.plist) with the one you removed initially.
When you next open Terminal, you’ll have your old preferences back—and a new Default item in your Library ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access