最近发现使用iTerm有一个痛点,使用终端时往往需要连接不同的服务器,通常我们会为每个服务器连接设置一个profile
记住每个标签连接的是哪个机器很费劲,所以希望通过profile name 来区分每个连接。这样通过 终端的 title 可以方便标记当前连接了哪台机器
临时修改终端的title
修改session title,Session->Edit Session(cmd+I)
,输入session title即可。这种方式只是临时修改了标签名字,方便临时标记
有时侯我们长期使用需要长期用 ssh 命令 连接远端固定ip的机器,这个时候可以利用 iTerm 的 profile 功能
- 确保
Preference->Appearance->Show profile name
选项勾上 - 打开
Profiles
,可以新建profile,设置profile name 以及command和快捷键,选中你要设置的profile,点击右边的Terminal标签,将Terminal may set tab/window name前的勾取消掉。
这样通过快捷键打开对用的profile,终端的title 就显示的是预先设置的profile name ,当然 也可以使用 cmd+I
快捷键临时修改 profile name