Quick Links
Summary
PuTTY is a versatileterminal emulator, initially designed forWindows. To date, it’s one of the most popularSSH clients for Windows. PuTTY is not limited to Windows only. With its large number of demand, it is also available across otheroperating systemslikeLinux.
What is PuTTY? (And Why You Need It on Linux)
Imagine you are working as a system engineer or developer in an IT company, where youmanage lots of files on a Linux system. However, your personal system runs on Windows. Then what do you do—should you installLinux? Not so fast—PuTTY is here to save the day for you.
PuTTY lets youconnect to remote servers and devicesusing various protocols like SSH and Telnet. Using PuTTY you canremotely open GUI applicationsover SSH servers. If you are a Sysadmin, PuTTY will help you to access other computers and communicate with their serial ports remotely.

You might wonder why PuTTY SSH matters sinceLinux distrosalready haveSSH capabilities and OpenSSHin their terminals. Put simply, PuTTY is a popular choice among Windows users, and if you’re one of them, you may simply feel more comfortable with it. Additionally, saving your different SSH sessions is easier with PuTTY. Manualediting of the SSH config fileis challenging in command-line tools—like the default Linux terminal. you may save SSH connections using the PuTTY graphical interface. It makes debugging and connection to raw sockets and serial ports a lot easier, as well.
How to Install PuTTY
Most Linux distributions do not come with PuTTY pre-installed. However, you can install PuTTY from thedefault repositoriesof Linux distributions. For example, in Debian-based distros, PuTTY is available inside the universe repository.
Install PuTTY Using the Terminal
Installation of different packages from a Linux terminal is one of the easy and fast methods. We can also install PuTTY on Linux using commands through the terminal.
To install PuTTY on Ubuntu, enable theuniverse repository. The PuTTY package is located inside this repository.

After enabling the universe repository, update the system to recognize its new access rights, withaptcommand:
To install PuTTY from the command line—run theaptinstallcommand:
The above command will successfully install the PuTTY in your system. Run PuTTY from application manager or terminal.
Toremovethe PuTTY use:
sudo apt remove putty
You can install PuTTY on Debian and its related distributions by usingapt-get:

PuTTY is also available on Arch Linux default repositories. To install it, run the following command:
Install PuTTY on CentOS, RHEL, and Fedora through the distro’s default package manager such asyumordnf.

To install PuTTY-related tools like pscp, psftp, plink, pageant, and puttygen, run this command:
sudo apt install putty-tools

Install PuTTY Using a Graphical Package Manager
You might prefer to install and manage software using a graphical user interface (GUI) rather than the terminal. Linux distributions come with pre-installed GUI-based software centers. You can effectively manage and install multiple software through software centers—without any need toremember Linux commands.
Unfortunately, PuTTY is not available in the default software store on Ubuntu 22.04. If you’ve installed the GNOME Software Center on Ubuntu, you can easily install PuTTY from there. But for everyone else, you can use an alternate GUI-based apt package manager tool calledSynaptic Package Manager.

Open Synaptic using the command line or application manager.
Inside the Synaptic search for the “putty” package.
In the main window, locate the PuTTY package. Check the box next to the “putty” package and right-click to mark it for installation. you may also mark PuTTY-related tools for installation if needed.
Once you’ve marked the package for installation, click on the “Apply” button.

Review the list displayed by Synaptic to ensure that it includes PuTTY and its dependencies. Click “Apply” to begin installation of PuTTY and its dependencies.
You’ll see a progress bar indicating the PuTTY installation. Wait for it until it finishes.

After the successful installation of PuTTY, a confirmation message will appear.
You can now launch PuTTY either from the application launcher or by running “putty” in the terminal.

In Fedora, you can install PuTTY as aFlatpakapplication directly from theGNOME Software Center. This app store provides you with a friendly interface for managing software packages via the dnf package manager.
Like Fedora, you can also directly install PuTTY onManjarofrom the Pamac package manager. Pamac is the graphical front-end for the pacman package manager. It can access the official Manjaro repositories and the Arch User Repository (AUR).

Install PuTTY Using the Source Code
Most people preferpackage managers to install packagesand software on Linux, and that’s OK. These package managers contain binary packages that are ready to install with a single command. However, you can also install software directlyfrom the source code.
Installing software from source code has some advantages over using package managers. For example, you’re able to access the most recent version of the software and stay updated with any changes. This can include security patches or new features that are not yet available in the binary packages. You can also control the features and options to install.
Make sure your system has the necessary build tools and dependencies installed for source code installation. PuTTY is built using CMake. So you’ll need a C/C++ compiler, make, CMake, and other development libraries.
To install these tools and libraries, first update the local package repository:
Now install build essential tools using following command:
build-essentialincludes essential build tools like gcc, g++, and make.cmakeis the build system we’ll be using.
Now download the PuTTY source code using thewgetcommand. you may also directly download thetarfileof PuTTYsource code from the website.
Replace the URL below with the actual URL for the latest version:
Usetar command to extractthe downloaded source code. If you have downloaded any other version, replace tar file name with the downloaded filename:
Thetarcommand will create a directory with the PuTTY source code. Navigate to the PuTTY source code directory using the belowcdcommand:
Now to build PuTTY source code,create a new"build" directory. This will separate the build files from source code. Next, navigate to build directory:
Use CMake to configure the build. As we are building the PuTTY in its source directory, you’re able to also specify a different path in this command:
This will generate build files based on your system.
When using cmake (.) single dot, the project configures inside the same folder containing the source files. While using cmake (..) double dot, the project is configured in a separate folder for building. This is a more organized way to use CMake for building projects.
After the configuration is complete, build PuTTY using themakecommand. Themakecommandwill compile the PuTTY source code.
To install PuTTY system-wide, you can use the following command:
This will copy PuTTY binaries and related files to appropriate system directories.
You can now run PuTTY from your terminal:
This will launch the PuTTY application, and you can use it to connect to remote servers.
After installation, you may face the error “Command ‘putty’ not found”—when you attempt to run PuTTY. This error occurs when the system can’t locate the PuTTY executable in any of the directories listed in your system’s PATH.
To fix this, you need to run the following command—after you compile PuTTY:
This will move the PuTTY binary from the build directory to a system-wide /usr/local/bin directory. It also updates thesystem’s PATH environment variabletoinclude the directorywhere PuTTY was installed (/usr/local/bin).
Another error message you may encounter is “fatal error: gtk/gtk.h: No such file or directory”
The error message you’re seeing is related to a missing header file (gtk/gtk.h) during the compilation of PuTTY from the source code. This indicates that PuTTY has a dependency on the GTK (GIMP Toolkit) library. Your system does not have the necessary development files for GTK installed.
To fix this error install the GTK development package on your Linux system.
To remove PuTTY installed through source code use
sudo rm /usr/local/bin/putty
PuTTY Remote Control Features
PuTTY is a top choice for system administrators and developers due to its exceptional remote-control capabilities. You canrun local scripts on a remote Linux serveror open a GUI application remotely. you’re able to also use PuTTY toshare files across local and remotecomputers.
PuTTY can also execute commands on a remote machine. It can share a remote computer’s screen on your local device, and securely log in to remote computers. PuTTY enables X11 forwarding for those who require graphical applications. you’re able to use it to run them from a remote server directly on your local machine.