Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check hostname and IP bindings in RH Linux 6.2?

Status
Not open for further replies.

JulianChappell

Technical User
Apr 8, 2002
6
GB
Hello,

I want to check what hostname and IP address is bound to my Linux server's ethernet card. Can anyone tell me how to do this? Please talk to me like I'm a niddiot, because my Linux and Networking knowledge is a little weak. I'm only doing this because Oracle support told me to.

TIA,

Julian
 
Hi,

On redhat, the hostname is set in the file /etc/sysconfig/network as the parameter 'HOSTNAME=' . To display that file use the cat command :

$ cat /etc/sysconfig/network

Similarly, the IP address details for the first ethernet card are stored in the file /etc/sysconfig/network-scripts/ifcfg-eth0 , although if it has 'BOOTPROTO=dhcp' then the interface would dynamically get an address via dhcp when the network was started.

$ cat /etc/sysconfig/network-scripts/ifcfg-eth0

The above are the static entries used to configure the system at startup. To view the actual active settings, including addresses set via dhcp, you'd do :

$ /sbin/ifconfig eth0

or even

$ /sbin/ifconfig (for all interfaces)

Hope this helps
 
Hello ifincham, you're help is very much appreciated, thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top