Disabling IPV6-Scenario 1
Edit File-/etc/sysctl.conf
$ sudo gedit / etc / Sysctl . conf
Add the following line at the end of the file.
# IPV6 Disabled
Net . IPv6 . conf . All . Disable_ipv6 = 1
Net . IPv6 . conf . default . Disable_ipv6 = 1
Net . IPv6 . conf . Lo . Disable_ipv6 = 1
Save and close
Restart Sysctl
$ sudo sysctl - P
Check the output of ifconfig again, there should be no IPv6 address.
$ ifconfig
eth0 Link EnCap : Ethernet HWaddr , : xx : - : 5f : - : 8b
inet Addr : 192.168 . 1.3 Bcast : 192.168 . 1.255 Mask : 255.255 . 255.0
Up broadcast RUNNING multicast MTU : the Metric : 1
RX Packets : 1346 Errors : 0 dropped : 0 Overruns : 0 Frame : 0
TX Packets : 965 Errors : 0 dropped : 0 Overruns : 0 Carrier : 0
Collisions : 0 Txqueuelen : +
RX bytes : 1501691 (1.5 MB) TX bytes : 104883 (104.8 KB)
If not, try restarting the system and checking ifconfig again
disabling Ipv6-grub Scenarios
IPV6 can also be disabled by editing the Grub configuration file.
$ sudo gedit / etc / default / Grub
Look for lines that contain "GRUBcmdlineLINUX" and edit as follows:
Grub_cmdline_linux = "Ipv6.disable=1"
You can also add a variable named "GRUBcmdlineLinux_default", which is also useful. Save and close the file to regenerate the grub configuration.
$ sudo update - GRUB2
Reboot, now IPV6 should have been disabled.
This article is from "peter-unscrupulousness Youth" blog, please be sure to keep this source http://petervip.blog.51cto.com/3790959/1688343
The IPV6 program is banned under Ubuntu