Use of /etc/sysconfig/network-scripts/ifcfg-eth* files

22,605

In RHEL/CentOS based system,

all Interface/Ipaddress settings saved in /etc/sysconfig/network-scripts/ifcfg-eth* the same you can find /etc/network/interfaces in debain/ubunt based OS

ifconfig If no arguments are given, ifconfig displays the status of the currently active interfaces, you can list all interface by using /sbin/ifconfig -a command and configure it.

when you restart service then it will reload settings from /etc/sysconfig/network-scripts/ifcfg-eth* and shows in ifconfig

if you are able to configure it , then just use ncurses tools using below command

neat-tui

Note:- if neat-tui not work then you need to install system-config-network-tui package.

or from GUI login system-config-network

Make sure you add the following option in /etc/sysconfig/network-scripts/ifcfg-eth*

ONBOOT=yes

If you don't, the interface will not activate.

You can also up the interface using

ifup eth1
Share:
22,605

Related videos on Youtube

Shraddha
Author by

Shraddha

Updated on September 18, 2022

Comments

  • Shraddha
    Shraddha almost 2 years

    What's the use of /etc/sysconfig/network-scripts/ifcfg-eth* files ? In some cases ifconfig lists the interface eth0 but I don't find the corresponding ifcfg-eth0 file whereas in other instances if I create the ifcfg-eth1 file and restart the network like service network restart - this interface is not listed in ifconfig ??

    • Rahul Patil
      Rahul Patil over 11 years
      first check in ifconfig -a then it will show all interfaces, then configure accordingly
    • Shraddha
      Shraddha over 11 years
      What I am trying to understand here is that does ifconfig use these files ? Who else uses these ifcfg-eth* files ?
    • Rahul Patil
      Rahul Patil over 11 years
      @Shrddha I have updated and explain ans
    • Rahul Patil
      Rahul Patil over 11 years
      for more info run man ifconfig
  • fbicknel
    fbicknel about 4 years
    After you've edited the file, then # systemctl restart NetworkManger to make it so. (RHEL/CentOS)
  • fbicknel
    fbicknel about 4 years
    neat-tui is deprecated. Use nmtui, which is in the NetworkManager-tui package.