port-for command not found

In this troubleshooting guide we learn how to fix port-for command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

port-for: command not found

or when using sudo you get the following error message

sudo: port-for: command not found

Solutions to port-for: command not found

How To Fix port-for: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu port-for is provided by python3-port-for package.

python3-port-for is:

port-for is a utility that helps with local TCP ports management. It can find an unused TCP localhost port and remember the association.

To fix this problem, we can install more using the command below.

sudo apt-get -y install python3-port-for

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install python3-port-for.

sudo apt -y install python3-port-for

Or if you have aptitude installed you can use the following command.

sudo aptitude install python3-port-for

Summary

In this tutorial we learn how to fix port-for command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.