Archive for category TCP IP

Set System Hostname on Ubuntu

This article teaches how to set Ubuntu system hostname, setting up your hostname on a Ubuntu is very simple and straightforward. You can directly query, or set, the hostname with the hostname command.

As an user you can see your current hostname with

sudo /bin/hostname

To set the hostname directly, you can su(switch user) to root and run

sudo /bin/hostname newname

When your system boots next time, it will automatically read the hostname from the file /etc/hostname

No Comments

Ubuntu Set Up DNS

This article teaches you how to set up DNS on Ubuntu. When it comes to DNS setup, Ubuntu doesn’t differ from other Linux distributions. You can add hostname and IP addresses to the file /etc/hosts for static lookups.

To make your machine to consult with a particular server for name lookups you simply add their addresses to /etc/resolv.conf.

For example a machine which should perform lookups from the DNS server at IP address 192.168.4.2 would have a resolv.conf file, in your terminal, type the following command to open it:

sudo vi /etc/resolv.conf

enter the following details

search example.com
nameserver 192.168.4.2

That’s it, simple right? Hope this helps!

,

No Comments