Victor S Asked: 2012-07-05 06:20:43 +0800 CST2012-07-05 06:20:43 +0800 CST 2012-07-05 06:20:43 +0800 CST Change the "device name" in the details window of System settings 772 I would like to change my "Device name" as shown in the settings panel. How do I do this? system-info 5 Answers Voted Best Answer vine_user 2012-07-05T07:39:56+08:002012-07-05T07:39:56+08:00 Execute the following command using a terminal: sudo sed -i 's/present-host-name/new-host-name/' /etc/hosts sudo sed -i 's/present-host-name/new-host-name/' /etc/hostname You can check your present-host-name by cat /etc/hostname or hostname. Then reboot the computer, to see the changes. Anwar 2012-07-05T06:49:09+08:002012-07-05T06:49:09+08:00 Open a terminal and issue the command gksu gedit /etc/hosts Then change the line 127.0.1.1 victor-System-Product-Name with 127.0.1.1 your-desired-name Then also open the file /etc/hostname with command gksu gedit /etc/hostname and change the hostname there to reflect the new name. Then reboot the computer, to see the changes Ember 2020-08-08T08:41:35+08:002020-08-08T08:41:35+08:00 You can use the built in service hostnamectl sudo hostnamectl set-hostname [NEW-HOSTNAME] replacing [NEW-HOSTNAME] with the hostname you would like this should work immediately on most things but I would reboot for good measure. Naveed Choudhry 2013-05-25T07:44:31+08:002013-05-25T07:44:31+08:00 Since there are plenty of ways to get something done here is one more: While in your root directory: cd /etc sudo vi hostname Type in your admin password, press Enter. Press i to 'insert' and change existing device name to the desired device name. Press Esc and type :wq!, press Enter. Restart the system for the change to take affect. atenz 2012-07-05T07:24:29+08:002012-07-05T07:24:29+08:00 Run this command , it will open up Text editor sudo gedit /etc/hostname Replace the present name to your Desired name. Save and close. Reboot for it to take effect.
Execute the following command using a terminal:
You can check your present-host-name by
cat /etc/hostname
orhostname
.Then reboot the computer, to see the changes.
Open a terminal and issue the command
Then change the line
with
Then also open the file
/etc/hostname
with commandgksu gedit /etc/hostname
and change the hostname there to reflect the new name.Then reboot the computer, to see the changes
You can use the built in service
hostnamectl
replacing
[NEW-HOSTNAME]
with the hostname you would like this should work immediately on most things but I would reboot for good measure.Since there are plenty of ways to get something done here is one more:
While in your root directory:
Type in your admin password, press Enter.
Press
i
to 'insert' and change existing device name to the desired device name.Press Esc and type
:wq!
, press Enter.Restart the system for the change to take affect.
Run this command , it will open up Text editor
Replace the present name to your Desired name. Save and close. Reboot for it to take effect.