📅 2015-Mar-20 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ hostname ⬩ 📚 Archive
Hostname is the name given to your computer. Ubuntu assigns a name automatically when you are installing it. This hostname is shown in the login screen and as part of your command prompt. Changing the hostname in Linux is quite easy.
$ sudo hostname new-hostname-foo
Edit the /etc/hostname
file and replace the current name in it with the new hostname.
Edit the /etc/hosts
file and replace the hostname for the IP address 127.0.1.1
with the new hostname.
Restart the computer.
Tried with: Ubuntu 14.04