In this tutorial, we will see how to disable IPv6 on Ubuntu using two methods. You should know that these two methods are also applicable on other Ubuntu derivatives.

Method 1

1. On Ubuntu/Linux Mint, launch the terminal and issue this command to check whether IPv6 is enabled or not:

cat /proc/sys/net/ipv6/conf/all/disable_ipv6

  • 0 --> Enabled
  • 1 --> Disabled

2. To disable IPv6, we need to edit the 'sysctl.conf' file. So, via the terminal, issue this command:

gksudo gedit /etc/sysctl.conf

Then add these four lines:

# IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Save the file and close it.

3. Issue now this command to reload your configuration:

sudo sysctl -p

IPv6 is now disabled, you can check its status with the first command given above (1 --> disabled).

Method 2

From the Terminal, run this command:

gksudo gedit /etc/default/grub

Then replace this line:


with this line:

GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”

Save the file and close it, then update the Grub boot loader with this command:

sudo update-grub

That's it!

Post a Comment