I want to change my device name but I have not found any option in the settings to do it. I am using Ubuntu for first time. Is there any way to change the device name that appears when I lock the desktop?
2 Answers
Here is the command line way:
Open a terminal Ctrl+Alt+Tand enter sudo hostname newname
. Replace newname
of your device by the new name that you want to call your device. Enter your password.
Then, edit the oldname in /etc/hostname
sudo nano /etc/hostname
and change the old name. Do the same in /etc/hosts
sudo nano /etc/hosts
Now you're done.
You can change the host name from terminal Ctrl+Alt+T
gksu gedit /etc/hostname
this will open hostname(/etc) file in gedit
,you can change your host name there and save the file.just restart your system and your host name is changed and when you lock the system that name will appears in top left corner of the desktop.However you can change the name of the user in System Settings->User Accounts click on the user in the right pane and change the name.logout and login again to see the change.

- 90,100
- 91
- 213
- 324

- 2,051
- 7
- 30
- 47
/etc/hosts
file too and replace the old hostname with the new one. – heemayl Feb 21 '15 at 17:37gksudo gedit /etc/hostname
– Mudit Kapil Feb 21 '15 at 18:45