> ## Content Index
> Fetch the complete content index at: https://linuxhandbook.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Checking Firewalld status
- URL: https://linuxhandbook.com/firewalld-check-status/
- Published: 2024-03-19T05:57:54.000Z
- Updated: 2024-03-19T05:57:54.000Z
- Description: It is important to check the status of the firewall to see if it's running or disabled.
- Author: Sagar Sharma
- Tags: Firewalld Basics, #docs-col

Want to check the firewalld status? The easiest way to check the status of firewalld is to use the following command:

```
sudo firewall-cmd --state
```

![sudo firewall-cmd --state](https://linuxhandbook.com/content/images/2024/03/Check-firewalld-status.png)

Want more details? I got you.

## Check firewalld status in Linux

There are two ways you can check the status of the firewalld in Linux:

- Using the `firewall-cmd` command
- Using the `systemctl` command

So let's start with the first one.

### 1\. Using the `firewall-cmd` command 

📋

This method requires superuser privileges.

The firewall-cmd is a command-line utility (of course) used to interact with the firewalld daemon and can be used to view the current firewall status, list/manage firewall rules, and of course, let you configure the firewalld as per your needs. 

To use the `firewalld-cmd` command to check the firewall status, use the following command:

![check the firewalld status using the firewall-cmd command](https://linuxhandbook.com/content/images/2024/03/Check-firewalld-status-1.png)

Furthermore, if you want to list the current firewall configuration including allowed services, ports, and interfaces, you can use the `firewalld-state` in the following manner: 

```
firewall-cmd --get-active-zones
```

![List the current firewalld configuration including allowed services, ports, and interfaces](https://linuxhandbook.com/content/images/2024/03/List-the-current-firewalld-configuration-including-allowed-services--ports--and-interfaces.png)

### 2\. Using the `systemctl` command 

The best part of using this method is you're not required to use superuser privileges to check the firewalld status:

```
systemctl status firewalld.service

```

![use the systemctl command to check the firewalld status](https://linuxhandbook.com/content/images/2024/03/Check-the-firewalld-status-using-the-systemctl-command.png)

If you see the `active (running)`, it simply means the firewalld is up and active.

## Inactive Firewalld? Here's how to activate

If the firewalld is inactive, then here's how to activate the firewalld: 

```
sudo systemctl start firewalld
```

But it will only start the firewalld for the current session. To start firewalld at every system boot, use the following: 

```
sudo systemctl enable firewalld
```

Once done, you can check the status again. 

## Wrapping Up...

This was a quick tutorial on how to check firewalld status on Linux using two different methods. I find the systemctl command easy as I use systemd and it aligns well with my workflow.

I hope you will find this guide helpful.