Change the host/computer name and bluetooth name in GNU/Linux

Hostname is the computer name, usually displayed in user@hostname format after login. This hostname is the name you gave during the installation of the GNU/Linux i.e, the computer name. Most of us wish to change this name afterwards. Here is a simple way described to perform the action.

1. sudo nano /etc/hostname
2. Just replace the whole thing i.e, the present hostname with the new one.
3. Save the file
4. sudo nano /etc/hosts
5. Edit the second line starting with 127.0.1.1 by replacing the current hostname with the same one you entered in /etc/hostname.
6. Save the file and logout.

During the next login changes will be made.

Another important thing is about the bluetooth name visible to others during file transfer. In Ubuntu I think the default name is ‘ubuntu-0’. Don’t you feel shame to have such a bluetooth name? It is your freedom to set a name of your own. That’s the power of GNU/Linux. Don’t worry at all. GNU/Linux is also capable of changing this name too. For the change to come true,

1. cd /var/lib/bluetooth
2. There will be a directory with your bluetooth device MAC address (Most probably only that will be the only one inside this directory). Get into
that directory.
3. sudo nano config
4. Substitute the perefered name adjacent to ‘name’ written as the first line.
5. Save the file.
6. Restart the bluetooth by sudo service bluetooth restart.

Now you can have that name in the bluetooth settings and accordingly as the public visible name.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s