【解決方法】Linux で Bluetooth サービスを無効にするにはどうすればよいですか?

プログラミングQA


利用した

sudo systemctl disable bluetooth

bluetoothctl show

Bluetoothが無効になることを期待しています。

それはまだ動作します….

nov25-1@nov251-desktop:~$ sudo systemctl disable bluetooth
Synchronizing state of bluetooth.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable bluetooth
Removed /etc/systemd/system/bluetooth.target.wants/bluetooth.service.
Removed /etc/systemd/system/dbus-org.bluez.service.
nov25-1@nov251-desktop:~$ bluetoothctl show
Controller 00:50:B6:80:4D:5D (public)
	Name: nov251-desktop #2
	Alias: nov251-desktop #2
	Class: 0x00740104
	Powered: yes
	Discoverable: no
	DiscoverableTimeout: 0x000000b4
	Pairable: yes
	UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
	UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
	UUID: Message Access Server     (00001132-0000-1000-8000-00805f9b34fb)
	UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
	UUID: Message Notification Se.. (00001133-0000-1000-8000-00805f9b34fb)
	UUID: Phonebook Access Server   (0000112f-0000-1000-8000-00805f9b34fb)
	UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
	UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
	UUID: IrMC Sync                 (00001104-0000-1000-8000-00805f9b34fb)
	UUID: OBEX File Transfer        (00001106-0000-1000-8000-00805f9b34fb)
	UUID: OBEX Object Push          (00001105-0000-1000-8000-00805f9b34fb)
	UUID: Handsfree Audio Gateway   (0000111f-0000-1000-8000-00805f9b34fb)
	UUID: Vendor specific           (00005005-0000-1000-8000-0002ee000001)
	UUID: Audio Source              (0000110a-0000-1000-8000-00805f9b34fb)
	Modalias: usb:v1D6Bp0246d0540
	Discovering: no
nov25-1@nov251-desktop:~$ 

私が試したこと:

I have used <pre>sudo systemctl disable bluetooth

bluetoothctl show

Bluetoothが無効になることを期待しています。

そうではありません – 私の Bluetooth はまだ機能しています。

実際にオフにする別のコマンドはありますか?そして、Linux で Bluetooth サービスが無効になっていることを確実に確認しますか?

解決策 1

systemctl disable <service> 次のシステム起動 (または実行レベルの変更) で を開始しないようにシステムに指示しますが、サービスが現在実行されている場合はサービスを停止しません。 を使用して、現在実行中のサービスを停止できます。 systemctl stop <service>. 実行中のサービスがあり、それを停止して無効にしたい場合は、次を使用できます systemctl disable --now <service>

コメント

タイトルとURLをコピーしました