Sam Hooke

These are rough notes from whatever I was working on, interested in or thinking about at the time. They vary greatly in quality and length, but prove useful to me, and hopefully to you too!

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 10.12.23.42/24 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.

<< Previous: Lightweight Python SIP library
Next: Emacs package managers >>