Do you want to change your device name as shown in System settings (as shown in the screenshot below) ?
Alright, we will change our device name with the all powerful sed commmand. For your information sed is a special editor for modifying files automatically. If you want to write a program to make changes in a file, sed is the tool to use. For more information on how to use sed refer to
Run the following in your 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
Now check your present-host-name by
cat /etc/hostname or