There are numerous reasons why users might not prefer using IPv6. If you find yourself in this category and are using Linux, continue reading the following article by Mytour to learn how to disable IPv6 on Linux.
Disabling IPv6 on Linux via Terminal
Adjusting and modifying network settings on Linux is done through the network icon on the control panel. Additionally, we can alter how IPv6 protocol devices are handled directly via Terminal using the sysctl command. Refer to accessing Terminal on Linux here.
To disable IPv6 on Linux via the sysctl command, firstly, we need root access on Terminal. To access root, open a Terminal window by pressing Ctrl + Alt + T or Ctrl + Shift + T, then input the su command.
Note: If unable to use the su command, you can replace it with the sudo -s command.
Once the Shell has root access, it can execute system-level commands without any issues. To disable IPv6 on the Terminal window, you input the command below:
- For Fedora / OpenSUSE and other RedHat OS distributions:
sysctl -w net.ipv6.conf.all.disable_ipv6=1
- For Ubuntu / Debian-based operating systems:
echo ' ' >> /etc/sysctl.conf
echo 'net.ipv6.conf.all.disable_ipv6 = 1' >> /etc/sysctl.conf
After executing the command above, run the following commands to disable IPv6 on your Linux computer:
- For Fedora / OpenSUSE and other RedHat OS distributions:
sysctl -w net.ipv6.conf.default.disable_ipv6=1
- For Ubuntu / Debian-based operating systems:
echo 'net.ipv6.conf.default.disable_ipv6 = 1' >> /etc/sysctl.conf
echo 'net.ipv6.conf.lo.disable_ipv6 = 1' >> /etc/sysctl.conf
Disable IPv6 on GUI Gnome Shell
For users of the Gnome Shell desktop environment, disabling IPv6 via Network Manager is feasible. This is an ideal solution for Gnome users who prefer not to use the Terminal.
Follow the steps below to disable IPv6 on Gnome:
To access Network Manager, navigate to the top corner of the desktop screen, locate and click on the network icon.
After selecting the Network Manager icon, locate and choose Wired settings or Wi-Fi settings to open the network settings window on Gnome.
Choose Network settings to open the settings window on Gnome. Here, find and click on the gear icon next to the network connection you use to access the Internet.
After clicking on the gear icon, a window named Wired or Wi-Fi will appear on the screen. In this window, find and click on the IPv6 tab.
In the IPv6 tab, find IPv6 Method and set it to Disable. This way, Gnome and Network Manager will no longer have access to IPv6 connections.
Disable IPv6 on GUI KDE Plasma 5
Similar to Gnome Shell, KDE Plasma 5 desktop environment provides users with options to disable IPv6 directly through the network settings interface.
To disable IPv6 through KDE, first click on the network icon on the control panel. A pop-up window will appear on the screen containing information about the current network connections you are using.
Click on the gear icon on the network window to display the network connection settings of Plasma 5. In the next window, find the IPv6 tab.
In the IPv6 tab window, find Method and set it to Ignored to instruct the network connection to bypass IPv6 connections.
Disable IPv6 on GTK+ desktop environment
If using the GTK+ desktop environment such as Mate, XFCE, LXDE, follow the steps below to disable IPv6 on Linux:
First, locate and click on the network connection icon on the control panel, then find and click on Edit Connections to open the network settings window.
Find and select the network connection you are using, click on the gear icon located at the top right corner to access the settings.
Next, find and click on the IPv6 Settings tab. To disable IPv6, change the Method value to Ignore and click Save to apply the changes.
This Mytour article just guided you on how to disable IPv6 on Linux. Hopefully, this article has provided you with useful information. Additionally, if you have any questions or need further clarification, readers can leave their comments below the article.