PuTTY, widely recognized for its SSH, Telnet, and serial terminal capabilities, is a familiar tool for many who manage remote servers or network devices. While most Linux distributions include native SSH support via the terminal, some users prefer PuTTY's graphical interface or need its session-saving and serial connection features. Installing PuTTY on Linux is straightforward, but the exact process varies depending on your distribution and preferred installation method.

Debian-based distributions like Ubuntu, Linux Mint, and others include PuTTY in their repositories, but the package resides in the Universe repository. This method ensures you receive a stable, distribution-supported version of PuTTY, along with its command-line tools.

Step 1: Enable the Universe repository if it isn't already active. This expands your available software sources and is required for PuTTY installation on Ubuntu-based systems.

sudo add-apt-repository universe

If the repository is already enabled, you'll see a confirmation message. Otherwise, the command will activate it for you.

Step 2: Update your package list to ensure you access the latest available software versions. This step prevents installation of outdated packages.

sudo apt update

Step 3: Install PuTTY using your package manager. The -y flag automatically approves prompts, streamlining the process.

sudo apt install -y putty

This command installs the graphical PuTTY client and related command-line tools such as pscp (SCP file transfer), psftp (SFTP file management), and puttygen (SSH key generation).

Step 4: Verify the installation by checking the PuTTY version. This confirms the application is available and ready to use.

putty --version

The output displays the installed version and confirms successful setup.

Step 5: Launch PuTTY either by typing putty in your terminal or by searching for it in your application menu. The interface closely resembles the Windows version, supporting SSH, Telnet, serial, and raw connections. Enter your server's hostname or IP address, select the connection type, and click Open to initiate a session.


Install PuTTY on Other Linux Distributions

For distributions outside the Debian/Ubuntu family, use the default package manager to install PuTTY. This method provides a quick and reliable installation tailored to your system's packaging standards.

Debian:

sudo apt-get install putty

Arch Linux, Manjaro:

sudo pacman -S putty

Fedora, CentOS, RHEL, Rocky Linux, AlmaLinux:

sudo dnf install putty

or for older systems:

sudo yum install putty

After installation, launch PuTTY from the terminal or your application menu. The interface and usage remain consistent across distributions.


Install PuTTY Using a Graphical Package Manager

For users who prefer a point-and-click approach, graphical package managers offer a convenient way to install PuTTY without memorizing terminal commands. On Ubuntu, PuTTY may not appear in the default Software Center, but you can use Synaptic Package Manager as an alternative.

Step 1: Install Synaptic if it isn't already present. This package manager provides advanced search and filtering options.

sudo apt install synaptic

Step 2: Launch Synaptic from your application menu or with the synaptic command. Search for putty, mark it for installation, and apply the changes. The process handles dependencies and provides progress feedback.

Other distributions offer similar software centers or package managers (e.g., GNOME Software on Fedora, Pamac on Manjaro) where PuTTY can be found and installed by searching for its name.


Compile PuTTY from Source Code

Building PuTTY from source gives you access to the latest features and bug fixes before they're packaged for your distribution. This method is best suited for advanced users or those needing the newest version.

Step 1: Install the required build tools and dependencies. These packages provide the necessary compilers and libraries for compiling graphical applications.

sudo apt-get install -y build-essential cmake libssl-dev libgtk-3-dev

Step 2: Download the latest PuTTY source code archive from the official website. Replace the URL with the most recent version if needed.

wget https://the.earth.li/~sgtatham/putty/latest/putty-0.83.tar.gz

Step 3: Extract the downloaded archive and navigate into the source directory.

tar -xvf putty-0.83.tar.gz
cd putty-0.83

Step 4: Create a separate build directory for a cleaner compilation process, then prepare the build files using CMake.

mkdir build
cd build
cmake ..

Step 5: Compile the source code. This step may take several minutes, depending on your hardware.

make

Step 6: Install PuTTY system-wide. This step may overwrite any previous PuTTY installations from your package manager.

sudo make install

If you encounter errors related to missing GTK libraries (e.g., gtk/gtk.h: No such file or directory), ensure libgtk-3-dev is installed and re-run the build steps.

After installation, run putty from the terminal to launch the application. If the command is not found, verify your PATH environment variable includes /usr/local/bin or the directory where PuTTY was installed.


PuTTY Alternatives and Native SSH Usage

Linux systems include the ssh command by default, which covers most remote access needs. For SSH, simply use:

ssh user@hostname_or_ip

For serial connections, tools like minicom or screen are available, but PuTTY's GUI can simplify managing multiple sessions and protocols, especially for users transitioning from Windows.


With these methods, you can install PuTTY on virtually any Linux distribution, whether you prefer a graphical interface, command-line tools, or the flexibility of building from source. Enjoy streamlined remote access and session management with your preferred workflow.