先用ifconfig br_name down 停掉網橋
再用brctl delbr br_name 刪除網橋
為了方便,我編寫了shell腳本來刪除網橋
#!/bin/bash #本腳本刪除的是br-開頭的網橋 BRIDGE_LIST=$(sudo brctl show | cut -f 1 | grep br-) echo "即將刪除的網橋是:"$BRIDGE_LIST for i in $BRIDGE_LIST do sudo ifconfig $i down sudo brctl delbr $i done echo "刪除之后用主機網橋狀態如下:" echo sudo brctl show