Redhat network interface configuration

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

ADVERTISEMENTS

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:

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
10 comments… add one
  • shailendra mishra Dec 10, 2010 @ 5:04

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

  • Pedro Inácio Feb 22, 2011 @ 9:47

    Thanks you!

  • amir Aug 20, 2011 @ 8:02

    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

    • vflash Aug 29, 2011 @ 8:27

      open your terminel.

  • Mohamed Sep 25, 2011 @ 6:33

    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

    • helper Sep 26, 2012 @ 8:41

      /sbin/ifconfig

  • Dinesh Rao Apr 8, 2013 @ 11:29

    Dear Sir,
    i like this command and please more information on my mail id &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.& thangs

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

    Thanks & Regards
    Dinesh Rao

    • anonymous Jan 8, 2015 @ 13:57

      execute /sbin/ifconfig and then check…

  • aref ghobadi Aug 27, 2015 @ 18:24

    Hi,
    thank you

  • Sanjay Manna Nov 27, 2015 @ 3:39

    Dear sir
    I used Ubuntu but using redhat 1st time, I am getting confused when i want to configure network manually, will u plz help me to configure network using gui interface.

    Thanks & Regards
    Sanjay Manna

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.