I just can't figure a way to change my Bluetooth device name.
Is there any command?
It seems the option was removed from the Bluetooth control panel, but you should still be able to change the name via the command line:
sudo hciconfig hci0 name 'Device Name'
Once you run the command, you should be able to verify the change by bringing up the Bluetooth control panel again and checking the device name.
service bluetooth restart
will show that the name change is reverted.
Jan 22, 2015 at 0:40
You can't change bluetooth device name from control panel in ubuntu yet. Here is the bug report, which provides this workaround:
If you want to change the bluetooth device name permanently, you have to create a file called
/etc/machine-info
which should have the following content:PRETTY_HOSTNAME=device-name
After this, restart the Bluetooth service:
sudo service bluetooth restart
Or reboot.
Alias
in /var/lib/bluetooth/*/settings
and call sudo hciconfig hci0 name '[email protected]'
- see my answer below: askubuntu.com/a/1326338/34298
What I did (on 12.04):
/var/lib/bluetooth/XX:XX:XX:XX:XX:XX/config
~# service bluetooth restart
)/etc/bluetooth/main.conf
?)I am using Blueman Bluetooth Manager. There is an option to change a computer's BT name in:
Adapter → Parameters
To change the bluetooth host name permanently, on Ubuntu 14.04 or later:
Open a terminal with CTRL-ALT-T
Edit /etc/bluetooth/main.conf replacing "%h" with the computer name you want. "%h" always seems to represent "ubuntu" on my systems for some reason.
gksudo gedit /etc/bluetooth/main.conf
For example change Name = %h-%d
to Name = gruber-%d
`
Remove /var/lib/bluetooth/xx:xx:xx:xx:xx:xx/config to make your system forget the old name. The xx:xx:xx:xx:xx:xx has a hexadecimal value unique to your bluetooth hardware.
sudo rm /var/lib/bluetooth/xx:xx:xx:xx:xx:xx/config
Restart the bluetooth service
sudo service bluetooth restart
(Under 15.04 or later:)
sudo systemctl restart bluetooth.service
You can check the new name by opening the Bluetooth settings. The last two steps are from Marx's answer.
config
file I would rather edit it, as in dreis nineoneone's answer. Incidentally, the service
command still works in 15.04.
The default Bluetooth package (bluez
) comes with a command-line utility bluetoothctl
that can set/reset the broadcast name (the "controller alias").
To change the broadcast name to new-name
:
bluetoothctl system-alias new-name
To remove the alias, setting the broadcast name back to your computer's name:
bluetoothctl reset-alias
This will modify the appropriate settings in /var/lib/bluetooth
automatically. MakeUseOf has a nice introduction on what you can do with bluetoothctl
.
You can change the name of a bluetooth remote device on your PC :
check the MAC adress of the device in the bluetooth settings. It looks:
XX:XX:XX:XX:XX:XX
open the Terminal and type:
sudo gedit /var/lib/bluetooth/XX:XX:XX:XX:XX:XX/config/info
if it asks for the password, type it (you won't see it)
modify (only) the value corresponding to 'Name'
Name=modified_name_as_you_like_it
The change will not be instantaneous !
Restart the service (or the PC), using the command:
sudo service bluetooth restart
bluetooth
service, the device isn renamed successfully but is not connected yet. When you connect, a new info
file is written which overwrites your chances and the device name is therefore reset.
Alias
in /var/lib/bluetooth/*/settings
On Ubuntu 20.04 you can do this from the settings.
Settings > About > Device Name
Reboot your computer for the changes to take effect.
sudo apt-get update; sudo apt-get install -y nano
sudo nano /var/lib/bluetooth/*/config
sudo service bluetooth restart
Update the value for “name”. In my case, it was: Ubuntu-0
In Ubuntu 20.10 look at
sudo grep Alias /var/lib/bluetooth/*/settings
edit the value Alias
with
sudo gedit /var/lib/bluetooth/*/settings
For example call it [email protected]
Then call
sudo hciconfig hci0 name '[email protected]'`
No need for reboot or bluetooth restart.
Alternatively you can do this from the settings:
Settings -> Info -> Gerätename
I guess in english it is:
Settings -> About -> Device Name
In Ubuntu 22.04, the following GUI option allows renaming in the Bluetooth Manager: