While IPv6 is essential for the long-term growth of the internet, there are situations where you might need to disable it on your Ubuntu system.

Here’s how to disable IPv6 on Ubuntu to help you address compatibility issues, network configuration, or specific use cases that require IPv6 deactivation.

Adding the specified lines to disable the IPv6 services on Ubuntu

How to Disable IPv6 Permanently on Ubuntu

By default, IPv6 is enabled and is used in parallel with IPv4.

To disable IPv6 on your Ubuntu system,open the terminalby pressingCtrl + Alt + Tanduse the nano editorto open the sysctl configuration file:

Applying the Changes to the Ubuntu System

Now, add the following code in the configuration file for disabling the IPv6 services:

In the above code:

After adding the given code, pressCtrl + Oto save changes and exit the editor. Now, apply changes to the system with:

Restart your network services with:

Verify the status of disabled IPv6 services by running:

If the output displays “1” as the status, it means that IPv6 has been successfully disabled on Ubuntu.

How to Temporarily Disable IPv6 on Ubuntu

To temporarily disable IPv6 on Ubuntu, run the followingsystemctlcommand with the-woption:

Now, restart the network services with:

As a result, all dependencies will be configured to temporarily disable the IPv6 services.

Take Charge of Your Ubuntu PC’s Network Configurations

Ubuntu makes it relatively straightforward to control IPv6 settings, ensuring that you can configure your system’s network behavior to your specific needs. Remember to use this knowledge carefully, as IPv6 will continue to play a crucial role in the global internet infrastructure.

Checking the Status of IPv6 on Ubuntu

temporarily disabling the IPv6 on Ubuntu using the specified command