Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

For a reversible test, inspect the current value, run sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1, and restore IPv6 with sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0. The change takes effect immediately but removes IPv6 addresses and routes, so existing IPv6 connections can stop. A runtime sysctl -w change normally is not persistent across reboot; persistent behavior comes from configuration in /etc/sysctl.d/*.conf or another local network configuration layer.

What temporarily disabling IPv6 actually does

Linux exposes the all-interface IPv6 switch as net.ipv6.conf.all.disable_ipv6. The documented values are simple: 0 enables IPv6 and 1 disables it. The kernel documentation describes the related control as specifying whether to disable IPv6 on all interfaces.

This is an operational network change, not just a way to hide IPv6 addresses in a display. When the value changes from 0 to 1, Linux dynamically deletes IPv6 addresses and routes from affected interfaces. New IPv6 addresses and routes cannot be added while IPv6 remains disabled. Applications that depend on IPv6 may fail over to IPv4, wait for a connection that never arrives, or lose an established IPv6 session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When you change the value back to 0, Linux re-enables IPv6. If necessary, it dynamically creates a link-local address and starts Duplicate Address Detection (DAD). That does not guarantee that every former global address, delegated prefix, router advertisement, or route will instantly return. The network environment and its configuration determine how addresses and routes are repopulated.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
  • Use the runtime method for a short troubleshooting test or a single maintenance window.
  • Record the original value and any network symptoms before changing it.
  • Expect active IPv6 connectivity to stop while the switch is set to 1.
  • Restore the value to 0 before you finish, then verify that the host has regained the addressing and routes it needs.

Plan the test before changing the kernel

Decide exactly what the test is meant to prove. If a website, package mirror, API client, or internal service behaves differently with IPv6 disabled, record the application, destination, interface, and address family involved. A successful IPv4 connection after the change can show that IPv6 selection or reachability is part of the problem, but it does not establish that disabling IPv6 is a safe permanent fix.

Use a local console, a serial connection, or an IPv4 management path when working on a remote machine. The disable operation removes IPv6 routes as well as addresses. If SSH, monitoring, storage, or another management service uses an IPv6 address, the session can terminate as soon as the setting changes. Keep the original command and the restore command ready before starting, and do not rely on a disconnected terminal to recover the host.

Also note that this switch affects the running host’s kernel networking state. It is not a per-application preference and it is not equivalent to changing DNS records, firewall rules, or resolver order. Those may still influence the symptom you are investigating.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the current IPv6 setting first

Open a terminal and read the live kernel value:

sysctl net.ipv6.conf.all.disable_ipv6

A typical enabled result is:

net.ipv6.conf.all.disable_ipv6 = 0

If the result ends in 1, IPv6 is already disabled through this all-interface control. Do not assume that changing it to 1 again will reveal why IPv6 is unavailable: a network manager, a per-interface setting, firewall policy, or another boot-time configuration may also be involved.

Save the output somewhere you can consult while testing. Also note which interfaces are connected and whether the machine currently has IPv6 addresses. The following command is useful for an inventory, although it does not change anything:

ip -6 addr show

Routes can be recorded separately:

ip -6 route show

These snapshots help you distinguish a successful temporary disable from a later restoration problem. They are observations, not a promise that the exact same global address or route will be recreated.

Disable IPv6 immediately for a reversible test

The runtime command writes the kernel parameter without editing a file:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

sudo supplies the privilege required to change the kernel setting. A successful write normally echoes the new value. If you receive an authentication error, authenticate with an account permitted to use sudo. If the parameter cannot be found, check that you are running Linux with IPv6 support available; a missing parameter is different from a value of 1.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Immediately read the value back:

sysctl net.ipv6.conf.all.disable_ipv6

Then inspect the interfaces and routes:

ip -6 addr show
ip -6 route show

Addresses and routes disappearing after the write is consistent with the kernel’s documented behavior. Test the specific application or connection that motivated the change. If the application now works over IPv4, that is evidence that address-family selection or IPv6 reachability is involved; it is not proof that disabling IPv6 is a suitable permanent design.

What to expect while IPv6 is disabled

  • IPv6 addresses may no longer appear on the affected interfaces.
  • IPv6 routes may be removed, including routes learned from the local network.
  • Existing IPv6 sockets can fail or disconnect; applications may reconnect using IPv4 if they support it.
  • Services bound only to IPv6 addresses may become unreachable until IPv6 is restored and addresses are configured again.
  • New IPv6 configuration cannot be added to an interface while the disable state applies.

Keep an out-of-band console or another recovery path available if you are changing a remote host. Losing the only management path is possible when the management service or route uses IPv6.

Restore IPv6 after the test

Set the same runtime control back to zero:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0

Confirm the live value:

sysctl net.ipv6.conf.all.disable_ipv6

The expected result is:

net.ipv6.conf.all.disable_ipv6 = 0

Linux can now create a link-local address and begin Duplicate Address Detection when needed. Check the result:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ip -6 addr show
ip -6 route show

Allow time for the local network to advertise prefixes or for the host’s network configuration service to request addresses again. If a former global address or route does not return immediately, that is not necessarily a failed sysctl operation. Reconnect or reactivate the relevant network connection using the normal tools for your distribution and network manager, or investigate the network’s router advertisements, DHCPv6 configuration, and local policy.

Restoration can therefore happen in stages. A link-local address may appear first, followed by a global address and routes after router advertisements or DHCPv6 processing. Duplicate Address Detection must also complete before an address is usable. Compare the post-test output with your initial snapshot, but expect legitimate differences if the network’s delegated prefix or lease changed during the interruption.

If the value reads 0 but IPv6 is still absent, the runtime switch is no longer the only factor. Look for persistent sysctl files, interface-specific settings, firewall rules, a network manager policy, or a module-loading sequence that changes the setting later.

Runtime change versus persistent configuration

A sysctl -w write changes the live kernel state. It does not, by itself, create a boot-time policy. The distinction matters because a test should end when the machine reboots, while a deliberate system policy should be documented and applied consistently.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Approach When it takes effect How to restore or change it Best use
Runtime sysctl -w Immediately, while the running kernel accepts the parameter Write 0 to re-enable or 1 to disable Short troubleshooting test or maintenance task
Sysctl configuration file such as /etc/sysctl.d/*.conf When the sysctl configuration service applies it during boot; interface-related values can also matter as interfaces appear Remove or edit the setting, then reload it through the distribution’s normal sysctl procedure or reboot Intentional persistent policy
IPv6 module parameter disable=1 When the IPv6 module is loaded, commonly during boot Enabling IPv6 again requires a reboot according to the kernel documentation Systems where a reboot-based policy is explicitly acceptable, not a quick test

On systems using systemd, systemd-sysctl reads configuration from sysctl.d directories at boot. A runtime write does not override a file that will be reapplied later, and a file you did not create may already set a conflicting value.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Do not add a persistent file for a temporary test

If the goal is only to test behavior for a few minutes or until the next reboot, stop after the runtime command and restore the value when finished. Creating a file can leave the next boot with IPv6 disabled, which is easy to miss when the original troubleshooting session is over.

Before assuming that a reboot will restore IPv6, inspect the local configuration. Search the documented sysctl.d locations and any distribution-specific network configuration for disable_ipv6 or an equivalent IPv6 policy. A package, previous administrator, or network manager may have installed the setting. If such a file exists, rebooting can simply apply the same disable policy again.

Use a sysctl.d file only for an intentional lasting policy

If you have decided that IPv6 should remain disabled across reboots, make that decision explicit and document why. A conventional configuration location is a file under /etc/sysctl.d/, for example a locally named file containing:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
net.ipv6.conf.all.disable_ipv6 = 1

The exact filename and reload command vary by distribution, so follow the system’s sysctl documentation. Keep a change record that identifies the file, the reason for the policy, and the reversal procedure:

net.ipv6.conf.all.disable_ipv6 = 0

Do not treat a persistent file as the same thing as the runtime test. The file is applied by the boot-time configuration mechanism and can be reapplied after a network interface appears. If the kernel parameter is unavailable during early boot because a module has not loaded yet, the sysctl.d manual recommends arranging for the module to load before the sysctl service or using a udev rule to apply the setting when the module appears.

Network managers can also set IPv6 policy. If your value changes after boot or after reconnecting a network, inspect those local layers rather than repeatedly issuing sysctl -w. A manual write may be correct at one moment and then be overwritten by the service that manages the interface.

How to undo an accidental persistent setting

If IPv6 remains disabled after a reboot, first read the live value and then locate the configuration that writes it. Check files under /etc/sysctl.d/ and other documented sysctl directories for a line setting net.ipv6.conf.all.disable_ipv6. Also inspect the network manager’s IPv6 profile if the value changes when an interface reconnects.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove or revise only the setting responsible for the unwanted policy, keeping a backup or change record according to your administration practice. Set the live value to 0, then reconnect the interface or reboot using your normal change procedure. Verify both the kernel value and the resulting addresses and routes; changing a file alone does not prove that the running kernel has already been restored.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Why the module parameter is the wrong shortcut for most tests

Linux also has an IPv6 module parameter commonly written as disable=1. It has stronger consequences than the runtime all-interface sysctl. The kernel documentation states that re-enabling IPv6 after using this module parameter requires a reboot. That makes it unsuitable when the purpose of the test is to turn IPv6 off and back on immediately.

Choose the module parameter only when a reboot is acceptable, the policy is understood, and you have a recovery plan. For an interactive troubleshooting session, use the runtime value instead:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
# perform the test
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0

Understanding all-interface scope and local overrides

net.ipv6.conf.all.disable_ipv6 is the documented all-interface control. It is the appropriate switch when you want the test to cover the host’s IPv6 behavior broadly. It does not mean that every userspace component will forget its own policy or that every interface will be configured identically after restoration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Linux also exposes interface-related IPv6 configuration, and distributions can apply settings as interfaces are created. A value you read from the all-interface control therefore should be interpreted alongside the actual state shown by ip -6 addr and ip -6 route. If only one interface behaves differently, investigate that interface’s configuration and the service managing it instead of assuming the global value explains everything.

Interface arrival timing matters for persistent settings. A sysctl service can apply a value before a later-created interface has all of its parameters available, while a udev rule or network service may apply policy when the device or module appears. This is why a setting can look correct immediately after boot yet change after plugging in hardware, bringing up a virtual interface, or reconnecting a network profile.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common failure modes

The command says permission denied

The write requires administrative privilege. Run it with sudo and authenticate with an account authorized to use sudo. Do not make the sysctl file world-writable as a workaround.

The parameter cannot be found

A missing net.ipv6.conf.all.disable_ipv6 parameter can indicate that IPv6 support is unavailable or that the running environment does not expose this kernel control. Verify that you are on the intended Linux host and inspect the kernel’s available sysctl parameters. A container or restricted execution environment may not permit changing host networking settings even when the command is visible.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

IPv6 remains present after writing 1

Read the value back first. If it is not 1, another component may have rejected or overwritten the write. If it is 1, inspect addresses and routes again and consider interface-specific configuration or a network manager’s state. The documented disable operation removes IPv6 addresses and routes from affected interfaces; seeing a value of 1 with an apparently usable IPv6 path warrants checking which namespace, host, or interface you are observing.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

IPv6 does not fully return after writing 0

Confirm that the value is 0, then check ip -6 addr show and ip -6 route show. Link-local creation and DAD can take time, and global addressing depends on router advertisements, DHCPv6, delegated prefixes, and the network manager. Reconnecting the interface through the normal distribution-specific network procedure may be necessary. If a persistent file or manager policy immediately sets the value back, correct that source instead of looping the runtime command.

The setting returns to 1 after reboot

A runtime write is not a boot-time restore mechanism. Search sysctl.d files and network-manager configuration for a persistent IPv6 disable policy. Remove or revise the file if the machine should boot with IPv6 enabled. If the value is applied only when a module or interface appears, review the ordering and udev or service configuration described by your distribution’s sysctl documentation.

A remote session disconnected

IPv6 removal can terminate a session that used an IPv6 address or route. Reconnect through IPv4, a local console, or another out-of-band path. Do not repeat the test remotely until you know which address family the management path uses.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A safe, repeatable test checklist

  1. Confirm you have console or alternate access if the host is remote.
  2. Record sysctl net.ipv6.conf.all.disable_ipv6.
  3. Record ip -6 addr show and ip -6 route show.
  4. Run sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1.
  5. Read the value back and verify that the expected IPv6 addresses and routes are gone.
  6. Run only the application or network test needed to isolate the problem.
  7. Run sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0 as soon as the test ends.
  8. Verify the value, link-local address, DAD progress, routes, and application connectivity.
  9. Inspect persistent configuration if the setting or addressing does not match the expected post-test state.

This sequence keeps the change reversible, makes the host’s original state visible, and separates a kernel-level toggle from the configuration services that may later manage the interface.

Frequently Asked Questions

Will sysctl -w keep IPv6 disabled after reboot?

No. It changes the live kernel value only. A reboot-time policy comes from sysctl.d or another local network configuration layer, so inspect those files if the setting returns after restarting.

Does setting disable_ipv6=0 restore every old IPv6 address immediately?

Not necessarily. Linux can recreate a link-local address and start Duplicate Address Detection, but global addresses and routes depend on router advertisements, DHCPv6, delegated prefixes, leases, and the network manager.

Is the module parameter disable=1 better for a temporary test?

No. The kernel documentation says IPv6 cannot be enabled again through that method without a reboot. Use the runtime all-interface sysctl when you need an immediate reversal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Can disabling IPv6 disconnect a remote SSH session?

Yes. Removing IPv6 addresses and routes can terminate any management connection using IPv6. Use an IPv4, console, serial, or other out-of-band recovery path before starting.

Why does the value change back after I set it?

A sysctl.d file, network manager, interface-specific policy, or module and interface startup ordering may be overwriting the runtime value. Find and correct that source instead of repeatedly issuing the command.

How do I verify that IPv6 is really disabled or restored?

Read sysctl net.ipv6.conf.all.disable_ipv6, then inspect ip -6 addr show and ip -6 route show. After restoration, allow time for link-local creation, DAD, router advertisements, DHCPv6, and normal network configuration.

The Bottom Line

For a short Linux troubleshooting test, use sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1, verify the live state, and restore it with the same setting at 0. Expect IPv6 addresses, routes, and active sessions to disappear while disabled. Do not confuse this reversible runtime change with a sysctl.d policy or the reboot-required module parameter, and verify addressing and routes after restoration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.