Where is NetworkManager configuration happening?

I am running standard xfce manjaro where networking ist managed by NetworkManager. Everything works I can not figure out where the hell configuration files are located.

  • /etc/NetworkManager/NetworkManager.conf
    is empty

  • /usr/lib/systemd/system/NetworkManager.service.d/NetworkManager-ovs.conf (mentioned by systemctl status
    has barely anything inside (and nothing related to known networking terms like, dhcp, static, address, gateway, whatever)

[Unit]
After=openvswitch.service

So, where in the world can you see the configuration NetworkManager relies upon and, in example, set up a static IP address if you wanted to?

Have a look at man networkmanager.conf

EDIT:
There is a config file for each connection here:
/etc/NetworkManager/system-connections/

Example Ethernet connection file:

[connection]
id=Wired connection 2
uuid=34bbc44e-3ded-30dc-9b96-361b515d003d
type=ethernet
autoconnect-priority=-100
permissions=
timestamp=1611032757

[ethernet]
mac-address=04:92:26:D1:17:C8
mac-address-blacklist=

[ipv4]
dns=208.67.222.222;208.67.220.220;
dns-search=
ignore-auto-dns=true
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=disabled

[proxy]

nmcli is the default administration tool for NetworkManager. You might want to take a look at its documentation.

For example, assuming that your Ethernet interface is called ens160, to assign an IP address would be something like this:

nmcli con mod ens160 ipv4.addresses X.X.X.X/M ipv4.gateway Y.Y.Y.Y

See ArchWiki for more details

1 Like

thanks everybody. getting clearer.

I though till now, NM was used in GUI environment only, but apparently it is not dependent on such. However I wonder whether it is fair to say NM is mainly used for Desktops?

Well, I would say the major desktop environments (e.g. Gnome, KDE) are integrated with NetworkManager via front ends to make things easier for the user.

My point with my previous post is that nmcli was designed to avoid making changes the old way.
Of course, this comes with a learning curve which is a drawback for some people. It’s a matter of preference.