So, I'm building hadoop cluster with raspberry right now, I need to disable ipv6 connectivity, and need to know whether ipv6 has been disabled or not.
In some guide cat /proc/sys/net/ipv6/conf/all/disable_ipv6 is supposed to give the result I want, but for some reason if I enter it my terminal said "no such files or directory".
Do you have some suggestions?

nb : there is already a question about ipv6 in 'IPv6 connectivity', but i didn't find the answer, and what i ask is how to disable and check whether it's disabled or not, while the other question is about enabling it, thanks.


1 Answer 1


IPv6 functionality is part of the kernel, and it may be modular (or configured out completely). If the module is not loaded, then there is not even the option of enabling or disabling it -- first the module must be loaded:

sudo modprobe ipv6

Will either create that directory tree in /proc/sys, or else throw an error indicating there is no such module -- but if you are using raspbian, that's the set-up.

This module has options which are documented here; evidently you could load this way:

sudo modprobe ipv6 disable=1

Which will prevent it from functioning. It also seems you can do something similar with a kernel invocation parameter by adding:


To /boot/cmdline.txt. Remember that that file should only be one line, the various parameters are just separated by spaces. This is effective at boot.

  • thanks, so by default ipv6 is not functional unless i enable it with sudo modprobe ipv6, right? and i can check whether ipv6 fuctionality is enabled or disabled by checking /proc/sys folder, am i right? Commented Apr 22, 2015 at 15:19
  • If that module is on your system (look in /lib/modules/[uname -r]/kernel/net/ipv6, or just try to load it), then yes. I think your best bet if you want to disable it is to actually load it, then disable it in /proc/sys, otherwise it could be automatically loaded and enabled for whatever reason.
    – goldilocks
    Commented Apr 22, 2015 at 15:23
  • thanks, i've loaded it, so there is /proc/sys/net/ipv6, and /lib/modules/3.18 7+/kernel/net/ipv6, now, how to disable it? Commented Apr 22, 2015 at 16:06
  • Presumably just echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 -- however you have to be root (e.g., use su), sudo will not work because there is redirection (>). I've edited in some more stuff about controlling this along with some official kernel documentation links.
    – goldilocks
    Commented Apr 22, 2015 at 16:18
  • /proc and /sys are kernel interfaces; some things are just readable, other things can be read and written to. Note they are not real files. So things like that which are binary options are either 0 or 1; you can check them with cat and set them with echo >.
    – goldilocks
    Commented Apr 22, 2015 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.