Home / Change the window title in Putty

Change the window title in Putty

Putty is an SSH/telnet/etc client which allows you to connect to remote servers such as a Linux or BSD webserver. When you change directories etc in a terminal shell the window title in Putty is likely to change, depending on the shell’s settings. This post looks at how to change the Putty window title to be what you want and how to prevent it changing as you change directories.

The first screenshot below shows the Windows taskbar with several instances of Putty running. The default value is usually something like the login name followed by the hostname and then the current directory. This can make it difficult to know which window is which when wanting to bring up a specific open putty connection.

putty windows with default naming from the shell

It is usually possible in your server’s shell configuration to change what appears in the window title, but instead of messing around with that you can do it in Putty instead.

Before logging in, make a couple of configuration settings changes and you can make the window title whatever you want it to be. Select "Window" -> "Bahaviour" and then enter a name in the "Window Title". In the example below I have labelled it "webserver" but it can be anything you want. The title will appear in the window’s title area, the taskbar button and in the Alt+Tab task switcher.

changing the window title with putty

The next step is to select "Terminal" -> "Features" and tick the box that is labelled "disable remote-controller window title changing" as shown in the screenshot below. Without setting this option the window title is likely to change when you change directories on the remote server.

prevent xterm from changing the window title

The final step is to save your settings so you don’t need to keep doing this each time. Go back to the main session screen, enter a name into the "Saved Sessions" section and click the "Save" button as shown in the screenshot below.

save your session for next time

The final screenshot below shows some example names and how much easier it is to distinguish among the various Putty windows open.

putty window titles with custom naming

It’s really easy to change the window title in Putty and makes it a lot easier to identify a particular server when, if like me, you often have several of them open.