Sam Hooke

Make temporary network changes permanent under CentOS 7

Say you make some temporary changes to your network configuration in CentOS 7. For example, assigning an IP address to an interface:

ip addr add dev ens192u1

In order for the above change to become permanent it needs to be written to file at /etc/sysconfig/network-scripts/ifcfg-ens192u1.

Rather than creating this file manually, you can automatically generate it from the current network configuration (including your temporary changes).

Run nmtui (as root), select “Edit a connection”, select your connection, then without making any changes select “OK” and then quit. It will have generated the ifcfg-ens192u1 file for you if it did not exist already.

See all notes.

← Previous Note: Lightweight Python SIP library
Next Note: Emacs package managers →