How To Install Zenmap In Linux Mint 20.x [2021]

In this tutorial, we are going to install Zenmap in Linux Mint 2.x as well as run a quick scan to see if Zenmap is running properly in Linux Mint. As you might expect, this Zenmap installation guide applies to Ubuntu 20.x and any other Ubuntu-based distribution out there. 

The reason you’re most likely here is that you upgraded Linux Mint to the latest version or proceeded with a fresh install, just to realize that Zenmap is no longer available in Ubuntu repositories.

This is caused by Zenmap’s heavy reliance on Python 2.7 which was officially deprecated in January 2020. Consequently, Zenmap is no longer maintained upstream.

However, there is a way we can install the necessary Python 2 dependencies and get Zenmap back to live in Linux Mint 20.x and other Ubuntu-based distributions. And here’s the proof:

Install Zenmap in Linux Mint 20.x. Source: nudesystems.com

The whole installation process will require no longer than 10 minutes. So without further ado, let’s get our fingers busy.

  1. Update/upgrade Linux Mint

Use the following command to update/upgrade your operating system and type your password when prompted:


sudo apt update && sudo apt upgrade

Install Zenmap in Linux Mint update and upgrade. Source: nudesystems.com
  1. Install NMAP in Linux Mint 20.x

Zenmap is the official GUI for Nmap Security Scanner and though we all love Nmap’s vast command-line functionality, there are a few things like Nmap’s Topology that comes in handy for visualizing our scans.

To install Nmap in Linux Mint, open a terminal and run the following command, and press the Y key when prompted to proceed with the installation:


sudo apt install nmap

Install Zenmap in Linux Mint - install Nmap. Source: nudesystems.com
  1. Remove Alien if installed [Optional]

Alien is an application that converts various Linux packages [.rpm, .slp, .tgz, and Linux Standard Base] to Debian packages. 

If you have Alien installed in your system [not installed by default in Linux Mint] we will need to uninstall Alien first and reinstall it later to make sure all dependencies are resolved correctly. 

To uninstall Alien, type the following command in the terminal: 


sudo apt remove alien

  1. Navigate to your Download folder

In the Terminal, navigate to the Downloads folder on your system by executing:


cd ~/Downloads

  1. Download the latest version of Alien by clicking HERE. Make sure you download Alien in the Downloads folder.
  1. Download Zenmap from Nmap package repository

To download the latest version of Zenmap in your Downloads folder on Linux Mint, by clicking here HERE

This link will open Nmap’s package repository. Scroll down to the bottom of the page and click on the last Zenmap release. 

Install Zenmap in Linux Mint - Download Zenmap. Source: nudesystems.com
  1. Download Python 2 dependencies in Linux Mint

Copy and paste the following commands in the terminal to download Zenmap Python 2 dependencies in your Downloads folder:


wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb


wget http://azure.archive.ubuntu.com/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.de


wget http://security.ubuntu.com/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb

At this point, you should have the following files in your Downloads folder:

Install Zenmap in Linux Mint - Download Zenmap. Source: nudesystems.com
  1. Install Python 2 dependencies in Linux Mint

Copy and paste the following commands in your terminal in the following order. Ignore any “unmet dependencies” error if it appears. 


sudo dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb


sudo dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb


sudo dpkg -i python-gtk2_2.24.0-5.1ubuntu2_amd64.deb

  1. Fix the Python 2 unmet dependencies – if any

Type the command below to fix the Python 2 broken dependencies that might have occurred in the previous step:


sudo apt --fix-broken install

  1. Install Alien in Linux Mint:

sudo dpkg -i alien<hit the Tab key to auto-complete>

Install Zenmap in Linux Mint - install Alien. Source: nudesystems.com

11. Convert Zenmap 

Now, let’s use Alien to convert the Zenmap .rpm package to .deb using the following command:


sudo alien zenmap<hit the Tab key to auto-complete>

Install Zenmap in Linux Mint - install Alien. Source: nudesystems.com

12. Install Zenmap in Linux Mint

sudo dpkg -i zenmap<hit the Tab key to auto-complete>

Install Zenmap in Linux Mint - install Zenmap. Source: nudesystems.com

13. Run Zenmap in Linux Mint

You may know that Zenmap requires you to be run as a root user to use it at its full potential. You can run Zenmap by executing the command below in your terminal:

sudo zenmap

Run Zenmap in Linux Mint via CLI. Source: nudesystems.com

Alternatively, you can run Zenmap from the Linux Mint menu, by typing Zenmap in the search box:

Run Zenmap in Linux Mint via Menu. Source: nudesystems.com

Testing Zenmap in Linux Mint

To test if Zenmap works properly in Linux Mint, launch the application and scan your own “localhost” or the IP 172.0.0.1

Test Zenmap in Linux Mint via Menu. Source: nudesystems.com

If you want to get on track fast with Zenmap I recommend you to start with the following step-by-step guide:

HOW TO USE ZENMAP TO SCAN A NETWORK

Troubleshooting

If you receive the following error when trying to run a scan in Zenmap, most likely you skipped step 2 in this tutorial: 

No such file or directory

This means that the nmap executable was not found in your system PATH, which is

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

Fix the error by running in the terminal the following command:


sudo apt install nmap

Conclusion

In this guide, we learned how to install Zenmap in Linux Mint as well as the Python 2 dependencies that were the primary reason why Zenmap is deprecated and no longer available on the Ubuntu repositories. 

I hope you found this article useful. If so, help my little website grow and share this post on your social media, forums, or personal website. I highly appreciate it!

See you next time.