Created
January 30, 2023 21:09
-
-
Save jbcpollak/4c1fa1512b4bf1f0887ab4704d15f0e3 to your computer and use it in GitHub Desktop.
A quick script to restart Bluetooth on Ubuntu or PopOS! 20.04, 22.04, etc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $(id -u) -ne 0 ]]; then | |
echo "Must run as root" | |
exit 1 | |
fi | |
systemctl stop bluetooth | |
hciconfig hci0 down | |
rmmod btusb | |
modprobe btusb | |
hciconfig hci0 up | |
systemctl start bluetooth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment