How to assign hostname to devices in home network

A typical home network consists of a wireless router that networks multiple computers, notebooks, tablets, smartphones, HTPC and other devices. These devices can be accessed by using their IP address. However, it is more convenient to access them using a hostname.

  • Most wireless routers assign dynamic IP address using DHCP. Instead, assigning static IP address to these devices makes it easier to assign a hostname to them later. It is pretty easy to assign static IP address in Ubuntu, Android or Raspbmc. Just make sure that the IP addresses you assign do not clash.

  • On the Ubuntu computer from which you want to access hostnames, add the mapping from the static IP addresses to hostname to the /etc/hosts file. You can give any hostname you want! They take effect immediately after the file is closed.

For example:

# Add to end of /etc/hosts file dad-notebook mom-pc mom-smartphone son-tablet home-htpc

Tried with: Ubuntu 14.04

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s