How to Install UFW on Ubuntu 22.04

Improve your Ubuntu Security with our UFW installation guide. In this guide, you will learn to update the package list to access the latest software information and then we will install, enable, disable, and also uninstall UFW on Ubuntu 22.04. Let’s start with straightforward instructions for a seamless experience.

Features of UFW

Below are some main features of UFW:

  • Easy to Use: UFW is simple to control and doesn’t require complex commands.
  • Blocks Everything First: It starts by blocking everything and lets you choose what to allow.
  • Manage Rules: You can decide which ports, apps, and IPs are allowed or denied.
  • App Friendly: Instead of numbers, you can use app names for rules.
  • Log Events: UFW keeps track of firewall actions for troubleshooting.
  • IPv4 and IPv6: It works with both types of internet protocol.
  • No Complex Setup: UFW hides technical complexity for user-friendliness.
  • Systemd Integration: UFW works well with systemd for better control.
  • Check and Disable: You can quickly see its status and turn it off.
  • Activate Easily: Enabling UFW is a breeze to activate your rules.

How to Install UFW on Ubuntu 22.04?

First of all, update the package list, to ensure your system is updated with the current information regarding available software:

sudo apt update

After that, install UFW on Ubuntu 22.04 by executing the following command:

sudo apt install ufw -y

How to Check the status of UFW on Ubuntu 22.04?

For checking the status of UFW on Ubuntu 22.04, then run out the following command:

sudo ufw status

How to Enable and Disable UFW on Ubuntu 22.04?

To activate UFW on Ubuntu 22.04, you can utilize the below command:

sudo ufw enable

If you want to disable UFW on Ubuntu 22.04, use the underlying command:

sudo ufw disable

How to Uninstall/Remove UFW on Ubuntu 22.04?

To uninstall UFW on Ubuntu 22.04, simply run the below command:

sudo apt remove ufw

That’s all from the effective guide related to installing UFW on Ubuntu 22.04.


In this guide, we have displayed how to install, enable, disable, and uninstall UFW on Ubuntu 22.04. For installing UFW on Ubuntu 22.04, first, update the packages list. After that, install UFW on Ubuntu 22.04 by utilizing the “sudo apt install ufw -y” command. Then, enable it using the “sudo ufw enable” command. To remove UFW on Ubuntu 22.04, use the “sudo apt remove ufw”.


Print Friendly, PDF & Email