需执行四步:1.停用并禁用蓝牙服务;2.屏蔽蓝牙服务单元;3.写入modprobe黑名单并更新initramfs;4.按顺序卸载btusb、bnep、bluetooth模块,确保lsmod无输出。

银河麒麟系统中需通过命令行彻底禁用蓝牙功能,防止服务自启、模块加载及硬件唤醒,避免后台资源占用与射频干扰。
停止并禁用蓝牙服务
先终止当前运行的蓝牙服务,再禁止其开机自启,这是最基础且必须的第一步。
执行命令:sudo systemctl stop bluetooth && sudo systemctl disable bluetooth
验证是否生效:运行 systemctl is-enabled bluetooth,输出必须为 【disabled】;若仍显示 enabled,说明 disable 失败,需检查是否输入了 sudo 权限或存在 systemd 单元覆盖。
屏蔽蓝牙服务(可选但推荐)
仅 disable 无法阻止其他服务或手动命令意外启动 bluetooth.service,mask 可彻底锁死该服务单元。
执行命令:sudo systemctl mask bluetooth.service
这会在 /etc/systemd/system/ 下创建指向 /dev/null 的软链接,任何 systemctl start bluetooth 请求都会失败并报错“Unit bluetooth.service is masked”。
阻止蓝牙内核模块加载
即使服务被禁用,只要蓝牙硬件存在,系统仍可能在检测到 USB/PCIe 设备时自动加载 bluetooth、btusb、bnep 等模块——这会重新激活底层支持,导致 hciconfig -a 仍能列出 hci0。
方法一:写入 modprobe 黑名单
执行以下三条命令逐行运行:
第一步:echo "install bluetooth /bin/true" | sudo tee -a /etc/modprobe.d/disable-bluetooth.conf
第二步:echo "install btusb /bin/true" | sudo tee -a /etc/modprobe.d/disable-bluetooth.conf
第三步:echo "install bnep /bin/true" | sudo tee -a /etc/modprobe.d/disable-bluetooth.conf
完成后执行 sudo update-initramfs -u(适用于基于 Debian 的麒麟V10 SP1+),确保 initramfs 镜像中也应用该规则。若跳过此步,重启后模块仍可能在早期启动阶段被加载。
卸载已加载的蓝牙模块
上述配置只对后续启动生效,当前已载入的模块需手动清除。
执行命令:sudo rmmod btusb bnep bluetooth
注意:顺序不能颠倒,必须先卸载 btusb(子模块),再卸载 bnep,最后卸载 bluetooth(父模块);若提示“Module xxx is in use”,说明有进程正占用蓝牙设备,此时先执行 sudo systemctl stop bluetooth 再重试。
验证结果:运行 lsmod | grep -i "bt\|bluetooth",应无任何输出。











