Skip to content

Instantly share code, notes, and snippets.

@jbcpollak
Created January 30, 2023 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbcpollak/4c1fa1512b4bf1f0887ab4704d15f0e3 to your computer and use it in GitHub Desktop.
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
#!/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