PDF download Download Article PDF download Download Article

If you're not using IPv6 on your network, there's typically no harm in leaving it enabled on your Linux PC. However, if you're using a IPv4 VPN, leaving IPv6 enabled may leak network traffic while the VPN is in use. This wikiHow teaches you how to disable IPv6 in Ubuntu, Debian, and Linux Mint. If you want to disable IPv6 permanently, you'll need to make some quick changes to your boot loader.

  1. This opens a terminal window.
  2. Advertisement
  3. As long as you see "1" as the result, you can continue to the next step.
    • If you see "0" instead, type sudo sysctl -p and press Enter. You will see three entries that all end with "1," which means you can continue.[1]
  4. The remaining steps will make it so you IPv6 remains disabled even after you reboot your PC. You'll be prompted to enter your password.
    • If you prefer to use a text editor other than Vi, such as Nano or Pico, feel free to use that instead.
    • Enter your password when prompted to do so.
  5. The current value is probably blank. Edit it so it looks like this instead:
    • GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"
    • If there were any other parameters here, such as "quiet splash," simply separate that parameter from the new one with a space (e.g., GRUB_CMDLINE_LINUX_DEFAULT="quiet spash ipv6.disable=1"
  6. Change this line so it looks like this:
    • GRUB_CMDLINE_LINUX="ipv6.disable=1"
  7. If you're using Vi, press the esc key, type wq!, and then press Enter.
  8. This ensures that IPv6 will remain disabled when you reboot your PC.[2]
  9. Advertisement


Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!

You Might Also Like

Advertisement

About This Article

Nicole Levine, MFA
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Nicole Levine, MFA. Nicole Levine is a Technology Writer and Editor for wikiHow. She has more than 20 years of experience creating technical documentation and leading support teams at major web hosting and software companies. Nicole also holds an MFA in Creative Writing from Portland State University and teaches composition, fiction-writing, and zine-making at various institutions. This article has been viewed 33,994 times.
How helpful is this?
Co-authors: 8
Updated: September 17, 2023
Views: 33,994
Categories: Basic Computer Skills
Article SummaryX

1. Run "sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1"
2. Run "sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1"
3. Run "sysctl -w net.ipv6.conf.lo.disable_ipv6=1"
4. Open /etc/default/grub for editing (needs root).
5. Make the values for GRUB_CMDLINE_LINUX_DEFAULT and GRUB_CMDLINE_LINUX " ipv6.disable=1""
6. Save and exit your text editor.
7. Run "sudo update-grub"

Did this summary help you?

Thanks to all authors for creating a page that has been read 33,994 times.

Is this article up to date?

Advertisement