Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Unix 如何删除网络接口?_Unix_Networking - Fatal编程技术网

Unix 如何删除网络接口?

Unix 如何删除网络接口?,unix,networking,Unix,Networking,我尝试使用ip隧道添加命令创建IPIP tunel。现在我想删除它,但它不会消失 tunl0 Link encap:IPIP Tunnel HWaddr NOARP MTU:1480 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

我尝试使用ip隧道添加命令创建IPIP tunel。现在我想删除它,但它不会消失

tunl0     Link encap:IPIP Tunnel  HWaddr   
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

$ sudo ifdown tunl0
ifdown: interface tunl0 not configured
$ sudo ifconfig tunl0 down
$ /sbin/ip tunnel del tunl0
delete tunnel tunl0 failed: Operation not permitted

我该怎么办?

与编程无关(需要转到serverfault.com)。这里的答案是:

你能找出这三个命令之间的区别吗?没有。我只是想用一些东西来删除界面。如果您所指的是root用户,则最后一个命令是以root用户身份执行的。如果最后一个命令是以root用户身份执行的,为什么提示是通常的
$
,而不是
#
?为什么不允许手术?双重检查或三重检查。:)