Disable IPv6 on Ubuntu 11.10

This is a short HOWTO on disabling IP version 6 support on your ethernet devices like eth0 on Ubuntu 11.10.
I guess you can do this on earlier version of Ubuntu as well.

  • Add the following line to the end of the file /etc/sysctl.conf (as root or use sudo)
  • net.ipv6.conf.all.disable_ipv6 = 1
  • Run the following command to make this change effective immediately

    # sudo sysctl -p

    A result from this command could be like this

    net.ipv6.conf.all.disable_ipv6 = 1

    To check that IPv6 has been disabled or not, run the following command from your console window

    # ip a | grep inet

    IPv6 has been disabled if this command does not return any IPv6 addresses.

    2 thoughts on “Disable IPv6 on Ubuntu 11.10

    1. /etc/sysctl.conf

      this file doesn’t save after adding that line(net.ipv6.conf.all.disable_ipv6 = 1)

    2. Hi,

      Did you remember to edit the file using the sudo command or as root?
      You need “administrator” privileges to write to the file.

    Comments are closed.