C7 And /etc/sysconfig/network

Home » CentOS » C7 And /etc/sysconfig/network
CentOS 2 Comments

Does CentOS 7 use /etc/sysconfig/network or is this replaced by some systemctl set of commands.

For example I know to set my host name with:

hostnamectl set-hostname nevia.htt-consult.com

But I don’t know if this is the same as

cat </etc/sysconfig/network || exit 1
NETWORKING=yes HOSTNAME=nevia.htt-consult.com EOF

2 thoughts on - C7 And /etc/sysconfig/network

  • On 8/25/2015 11:58 AM, Robert Moskowitz wrote:> Does CentOS 7 use /etc/sysconfig/network or is this replaced by some

    I let Network Manager control the interfaces on my two or three C7 boxes. I used nmtui to set the hostname, and MAC and IP addresses (the MAC addresses need to be updated if you clone a machine in VMware) interactively.

    That’s not scriptable, but there is an nmcli command that may help.

  • I found that ifup complained without the network file. So I added it, as I occationally need ifdown and ifup.

    I use hostnamectl to set the host name, but that does not directly impact ifcfg-eth0 that I need as well with hostname?

    I am interested in setting MAC addresses, I edit
    /etc/udev/rules.d/70-persistent-net.rules

    AND THEN still need to enter this altered MAC addr into ifcfg-eth0.