7

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?

αғsнιη
  • 36,350

2 Answers2

20

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.

efthialex
  • 3,941
Jos
  • 30,529
  • 8
  • 89
  • 96
2

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.

Pilot6
  • 92,041
Mudit Kapil
  • 2,081