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.
-
1Jos: One point, The user might need to edit the
/etc/hosts
file too and replace the old hostname with the new one.– heemaylFeb 21, 2015 at 17:37 -
-
Never seen that GUI @Rinzwind. I wonder what other utilities are out there that are not installed by default, but would otherwise be useful.– JosFeb 21, 2015 at 17:48
-
Oh would not surprise me if there are more than 1000. I have seen so many nifty small gui tools that the gnome devs in the old days considered unwanted due to preferring the command line method :P– RinzwindFeb 21, 2015 at 17:49
-
1@Rinzwind @Randeep or you can change host name using
gksudo gedit /etc/hostname
Feb 21, 2015 at 18:45
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.