Redhat network interface configuration

by nixcraft on March 29, 2006 · 5 comments

Redhat Linux network interface names start with ethX. First Ethernet network interface name is eth0, second is eth1 and so on.

Login as a root user, use su - command:

$ su -

To list or display more information about network interface type command:

# ifconfig | less

To assign an IP address type following command:

# ifconfig eth0 192.168.1.1 up

To take down network interface type following command:

# ifconfig eth0 down

To configure network card using GUI tool type command:

# redhat-config-network

You can also type command setup and select network configuration from menu:

# setup

If you wish to configure network interface manually then you need to edit files stored in /etc/sysconfig/network-scripts/ directory. For example here is my sample /etc/sysconfig/network-scripts/ifcfg-eth0 file for eth0 network interface:

DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
HWADDR=00:0F:EA:91:04:07
IPADDR=192.168.1.111
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
TYPE=Ethernet

See also:

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 5 comments… read them below or add one }

1 shailendra mishra December 10, 2010

i like this command and please more information on my mail id “”

Reply

2 Pedro InĂ¡cio February 22, 2011

Thanks you!

Reply

3 amir August 20, 2011

I just install red hat linux in vmware player and it shows in GUI mode so how i can change in command line interface.

thanks

Reply

4 vflash August 29, 2011

open your terminel.

Reply

5 Mohamed September 25, 2011

HI Dears,

I am a new user in linux and I install redhat 4 into my machine. but I can not configure the network card. when I tried what you describ here, I found eth0 only and when I used ifconfig comand, there is a message the command is not exist. But I can see the help of ifconfig.

would you please help me to setup the network card step by step.

Thank you

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 7 + 6 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.



Previous post:

Next post: