ufw command not found

In this troubleshooting guide we learn how to fix ufw command not found error message

Introduction

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

ufw: command not found

or when using sudo you get the following error message

sudo: ufw: command not found

Solutions to ufw: command not found

How To Fix ufw: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu ufw is provided by ufw package.

ufw is:

The Uncomplicated FireWall is a front-end for iptables, to make managing a Netfilter firewall easier. It provides a command line interface with syntax similar to OpenBSD’s Packet Filter. It is particularly well-suited as a host-based firewall.

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

sudo apt-get -y install ufw

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

You can also use apt command to install ufw.

sudo apt -y install ufw

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

sudo aptitude install ufw

Summary

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