How To: Set Host, IP & Domain – Linux Redhat

  • Share
  • CevherShare
  • Share

 

In Linux redhat server configuration IP address, hostname and domain name play an important role to connect with other client / server. If we made any mistakes in IP address, Hostname and domainname , two systems will not communicate each other.

Hostname, Domainname should be same and IP address shouls be in same network.

Eg:

Hostname: Server1.example.com
Doamin name: example.com
IP Address: 192.168.1.110

 

How To view IP address, Hostname & Domain name

For ip address: #ifconfig
For hostname: #hostname
For doaminname: #domainname

 

How To Setup

Go to System -> Administration -> Network

(or)

In terminal mode

#neat

To edit in  Terminal

#system-config-network-tui

To edit in  GUI

#system-config-network-gui

 

How To Set Hostname

#hostname –> This command will display current hostname

#hostname <new hostname>

#hostname station4.example.com

 

How To Set Domainname

#domainname  –> This command will display current domain name

#domainname new domain name

#domainname example.com

 

Also you have make an entry in this configuration file

#vim /etc/hosts
#vim /etc/sysconfig/network
#vim /etc/resolv.conf

prasad

About prasad

Prasad K has written 111 post in this blog.

2 Responses to How To: Set Host, IP & Domain – Linux Redhat

  1. whoah this blog is wonderful i really like studying your articles. Stay up the great work! You recognize, a lot of people are looking around for this info, you could help them greatly.

  2. Wohh just what I was searching for, thanks for putting up.