Home > Article > Operation and Maintenance > How to check whether linux supports ipv6
Two viewing methods: 1. Execute the "ifconfig" command to display the IP address and check the output information. If "inet6" information is included, it indicates that ipv6 is supported. 2. Execute the "netstat -tuln" command to detect the service monitoring IP, if the output result contains "tcp6" information, it means ipv6 is supported.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Method 1: Use the ifconfig command to check whether your IP address contains an IPv6 address
If the output result contains "inet6", it means that ipv6 is supported. If ipv6 is not supported, the output result will not contain "inet6".
Method 2: Use the netstat -tuln command to check whether there is an address in IPv6 format among the IPs monitored by the service.
If the output result contains "tcp6" information, it means ipv6 is supported.
Extended knowledge: How to enable IPV6
1. vim /etc/sysctl.conf
Modify the following values is 0, if not, just add it
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6= 0
net.ipv6.conf .lo.disable_ipv6 = 0
2, vim /etc/modprobe.d/disable_ipv6.conf
Change the following value to 0, otherwise Just add
options ipv6 disable= 0
3. vim /etc/sysconfig/network
Change the following Modify the value yes, if not, just add it
NETWORKING IPV6=yes
At this point, the server-side support for ipv6 has been modified
4. Restart the server to test whether it supports ipv6
Restart command:
service network restart
After restarting, ifconfig checks the ipv6 information and sees about The output of ipv6 is fine.
Related recommendations: "Linux Video Tutorial"
The above is the detailed content of How to check whether linux supports ipv6. For more information, please follow other related articles on the PHP Chinese website!