Do you want to change your hostname?. Basically, a hostname is the name of the computer, and it must be unique as it is used to identify your system in the network. You can also see your hostname explicitly in the Terminal Window.
Did you know that Ubuntu does not provide any graphical interface like Windows to change your Hostname?. It only asks you to provide your hostname during installation, but if you want to know how to change your hostname in Ubuntu14.04 after installation then just have a glance at this article and follow these simple steps shown below.
Steps to change your hostname (Computer Name):
Step 1: Go to Unity Dash and type “terminal”. You’ll see a terminal icon, click on it to open or you can directly open your terminal by using “Ctrl + ALT + T” button combination.
Step 2: Now, Under ‘Terminal’ type: “sudo gedit /etc/hostname” and press enter. Here, you may have to provide your Ubuntu password for authentication and then press enter.
Step 3: Now ” /etc/hostname” file gets pop open. This file contains your computer’s hostname only.
Step 4: Just delete the hostname in ” /etc/hostname” file and type your desired hostname. Don’t forget to press “Save” button.
Step 5: Your hostname is also stored in the ‘/etc/hosts’ file. So, You’ll have to change the hostname in your hosts file. For that type: “sudo gedit /etc/hosts” and hit enter.
Step 6: Now ” /etc/hosts” file gets pop open. Here, you have to change your old hostname and replace with the new one.
Step 7: After changing your hostname, don’t forget to press “Save” button as shown in the image below.
Step 8: If you want to change your hostname immediately, then type: “sudo hostname your-new-hostname”.
Step 9: You have to open a new terminal by using (Ctrl + ALT + T) in order to view the changes.
That’s all friends. Keep reading.
Leave a Reply