Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Fedora 移除 pan0、virbr0 虛擬網卡完整教學

編輯:Linux 教學

Fedora 安裝虛擬化套件 (libvirt/KVM) 後會自動建立 virbr0 (虛擬橋接網卡) 與 pan0 (藍牙 PAN 網卡)。若不需要虛擬化或藍牙功能,可透過移除相關套件徹底清理這些虛擬介面。

一、虛擬介面用途說明

二、移除步驟 (依序嘗試)

步驟 1:移除虛擬化套件群組


yum groupremove "Virtualization"
# 或 dnf groupremove "Virtualization" (Fedora 22+)

驗證:ifconfig -a 或 ip link show 確認 virbr0 是否消失。

步驟 2:移除 libvirt 核心套件 (若步驟 1 無效)


yum remove libvirt
# 或 dnf remove libvirt

再次驗證虛擬介面狀態。

步驟 3:處理 YUM 錯誤 (RHN 插件衝突)

若 yum 報錯 This system is not registered with RHN:


vi /etc/yum/pluginconf.d/rhnplugin.conf
# 將 enabled=1 改為 enabled=0
# 禁用 RHN 插件後重試移除
yum remove libvirt

步驟 4:移除藍牙相關套件 (清理 pan0)


yum remove bluez bluez-libs networkmanager-bluetooth

三、重啟驗證


reboot
# 重啟後執行
ifconfig -a
# 或
ip link show

預期結果:僅剩 eth0 (實體網卡) 與 lo (回環介面)。

四、手動臨時關閉 (不移除套件)

若暫時不需要,可手動關閉介面並禁用服務:


# 關閉 virbr0
virsh net-destroy default
virsh net-undefine default

# 關閉 pan0
ip link set pan0 down
ip link delete pan0 type bridge

# 禁用 libvirtd 服務
systemctl stop libvirtd
systemctl disable libvirtd

# 禁用藍牙服務
systemctl stop bluetooth
systemctl disable bluetooth

注意: 手動關閉重啟後會恢復,徹底移除需移除套件。

五、驗證輸出範例


[root@localhost ~]# ifconfig
eth0: flags=4163  mtu 1500
        inet 192.168.184.128  netmask 255.255.255.0  broadcast 192.168.184.255
        inet6 fe80::20c:29ff:fefa:e224  prefixlen 64  scopeid 0x20
        ether 00:0c:29:fa:e2:24  txqueuelen 1000  (Ethernet)

lo: flags=73  mtu 16436
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (Local Loopback)

確認無 virbr0、pan0 介面即為成功。

Copyright © Windows教程網 All Rights Reserved
介面用途來源套件
virbr0libvirt 虛擬機預設 NAT 網橋libvirt-daemon / qemu-kvm
pan0藍牙個人區域網路 (PAN) 支援bluez / networkmanager-bluetooth