nft command not found

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

Introduction

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

nft: command not found

or when using sudo you get the following error message

sudo: nft: command not found

Solutions to nft: command not found

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

In Ubuntu nft is provided by nftables package.

nftables is:

This software provides an in-kernel packet classification framework that is based on a network-specific Virtual Machine (VM) and the nft userspace command line tool. The nftables framework reuses the existing Netfilter subsystems such as the existing hook infrastructure, the connection tracking system, NAT, userspace queueing and logging subsystem.

nftables replaces the old popular iptables, ip6tables, arptables and ebtables.

Netfilter software and nftables in particular are used in applications such as Internet connection sharing, firewalls, IP accounting, transparent proxying, advanced routing and traffic control.

A Linux kernel >= 3.13 is required. However, >= 4.14 is recommended.

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

sudo apt-get -y install nftables

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

You can also use apt command to install nftables.

sudo apt -y install nftables

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

sudo aptitude install nftables

Summary

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