Disable default IPv6 protocol on Ubuntu 18.04 Linux


this is what my hosts file looks like from a default install of 18.04.1. i have a static ip set. i changed the host name using your steps but i left the hosts file alone and it persisted after a reboot. is the whole ipv6 thing going on the default in ubuntu server now?

How to change hostname on Ubuntu 18.04 Bionic Beaver Linux - LinuxConfig.org


My understanding is that the IPv6 protocol has been enabled by default for some time already. If you wish to disable IPv6 network addresses simply execute:

$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
$ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

For better, after the reboot persistent solution, follow our guide on How to disable IPv6 address on Ubuntu 18.04 Bionic Beaver Linux.

However, in most cases you do not have to worry about IPv6 and simply ignore it.