如何启用iTerm2窗口标题栏?误改偏好后如何恢复显示?
Got it, let's get your iTerm2 title bar back up and running. Whether you're trying to enable it for the first time or restore it after accidentally hiding it, here are two simple methods:
Method 1: Restore via iTerm2 Preferences (GUI)
This is the most intuitive way, especially if you prefer point-and-click:
- Open iTerm2, then click the iTerm2 menu in the top-left corner of your macOS menu bar (even if your iTerm windows don't have title bars, this main menu will still be there).
- Select Preferences (or use the shortcut
Cmd + ,to jump straight there). - Switch to the Appearance tab in the Preferences window.
- Scroll down to the Window section, then check the box next to Show title bar.
- That's it! All open iTerm2 windows will immediately display the title bar, and any new windows you open will follow this setting too.
Method 2: Quick Fix via Command Line
If you're more comfortable working in the terminal itself, you can tweak the setting directly with this command:
defaults write com.googlecode.iterm2 ShowTitlebar -bool YES
After running the command, quit and restart iTerm2 for the change to take effect. If you ever want to hide the title bar again later, just replace YES with NO in the command.
Hope that solves your problem smoothly!
内容的提问来源于stack exchange,提问作者Rob Bednark




