1.wget google.com(检查ipv4网络是否ok,如下所以ok会返回 200 ok的响应码)
emdoor@emdoor:~$ wget google.com
–2021-04-07 10:29:43-- http://google.com/
Resolving google.com (google.com)… 172.217.14.110, 2607:f8b0:4007:803::200e
Connecting to google.com (google.com)|172.217.14.110|:80… connected.
HTTP request sent, awaiting response… 301 Moved Permanently
Location: http://www.google.com/ [following]
–2021-04-07 10:29:44-- http://www.google.com/
Resolving www.google.com (www.google.com)… 216.58.193.196, 2607:f8b0:4007:80f::2004
Connecting to www.google.com (www.google.com)|216.58.193.196|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [text/html]
Saving to: ‘index.html.2’
index.html.2 [ <=> ] 13.74K --.-KB/s in 0.02s
2.wget ipv6.google.com(检查ipv6网络是否ok)
emdoor@emdoor:~$ wget ipv6.google.com
–2021-04-07 10:32:08-- http://ipv6.google.com/
Resolving ipv