a script for restarting bluetooth driver in xUbuntu 1
- open terminal (typically
ctrl+shift+torsuper+t)
- type:
nano bt2
- copy into terminal:
#!/bin/bash
#restart bluetooth drivers
sudo hciconfig hci0 down
sudo rmmod btusb
sudo modprobe btusb
sudo hciconfig hci0 up
- optional: you can add
neofetchas the last line, if you have it installed & would like to see an output in terminal to verify script has run.3
-
press
ctrl+x, followed byy, & tap enter to save. -
now type or copy in terminal: 4
chmod +x btthensudo cp /usr/bin
Now you can execute by typing bt, pressing enter, & usinge your password in terminal when you need to connect a bluetooth device!
Footnotes
-
Particularly Pop_OS 20.04LTS. Some commands may not work on newer builds. ↩
-
I like
nano. Please use which ever editor you like here. ↩ -
If it's not installed, it should be an available package. Typically
sudo apt install neofetchwill do the job. ↩ -
- Please note: there's some security risks for placing a simple script in
/usr/bin.
- If you prever not to take the risk, please do not use
sudo cp /usr/bin. Instead execute with./bt+enter.
- Please note: there's some security risks for placing a simple script in