The hostname of my name is very long, which is odd. How can change the hostname for my system?
My hostname, currently, is
Is there any way I can shorten this or change it entirely?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Open Terminal (Alt+Ctrl+T), and enter this:
sudo -H gedit /etc/hostname
Enter your password, and then a file will open. Just change the name to the new hostname, and save the file. Do the same with the hosts file, by running:
sudo -H gedit /etc/hosts
Edit the name to your new hostname after 127.0.0.1 and save.
Restart your computer, and it should be done.
gksudo instead of
sudo. It's safer.