
Where NetworkManager stores settings (SOLVED)
January 9, 2022
NetworkManager Configuration Files
NetworkManager supports various plug-ins that can define new locations for storing configuration information.
The main configuration file for NetworkManager, which is usually changed, is /etc/NetworkManager/NetworkManager.conf. You can view its contents with the following command:
cat /etc/NetworkManager/NetworkManager.conf
In addition to this file, NetworkManager settings can be saved in the /etc/NetworkManager/conf.d and /usr/lib/NetworkManager/conf.d directories.
For a list of all NetworkManager settings, taking into account all configuration files, run the command:
NetworkManager --print-config
Where NetworkManager stores network connection settings
NetworkManager stores the settings for each connection in separate text files with the .nmconnection extension. A typical storage location for configuration files is /var/run/NetworkManager/system-connections. In addition to it, files with connections can be located in other places defined by NetworkManager plugins, for example, settings for network connections via Bluetooth can be stored in the /etc/NetworkManager/NetworkManager.conf folder. The NetworkManager configuration file is /etc/NetworkManager/NetworkManager.conf. Besides these main locations, there may be other paths that are specific to Linux distributions.
To list all network connections and the location of their configuration files, run the command:
nmcli -f NAME,DEVICE,FILENAME connection show
All NetworkManager configuration files
So, the configuration files for NetworkManager are as follows:
- /etc/NetworkManager/NetworkManager.conf – main configuration file
- /etc/NetworkManager/conf.d – directory with configuration files
- /usr/lib/NetworkManager/conf.d – system directory with configuration files (for example, file /usr/lib/NetworkManager/conf.d/20-connectivity.conf)
- /var/lib/NetworkManager/NetworkManager-intern.conf – internal configuration file. This file is written and read by NetworkManager, and its configuration values are merged with the configuration from NetworkManager.conf. Changes made to this file will be overwritten
- /var/lib/NetworkManager/NetworkManager.state – file with a set of states
- /etc/NetworkManager/system-connections/ – directory where wired and wireless connections are stored
- /var/run/NetworkManager/system-connections/ – directory with some types of connections, for example, Internet via Bluetooth modem
- /var/lib/NetworkManager/
- /etc/NetworkManager/dispatcher.d/
- /etc/NetworkManager/dnsmasq.d/
- /etc/NetworkManager/dnsmasq-shared.d/
See also: How to remove Mobile broadband and Bluetooth connection in NetworkManager
Related articles:
- How to prevent NetworkManager from managing a specific interface? (SOLVED) (93.2%)
- How to prevent NetworkManager and other programs from modifying the /etc/resolv.conf file (63.7%)
- How to remove Mobile broadband and Bluetooth connection in NetworkManager (63.7%)
- Warning: apt-key is deprecated (SOLVED) (56.8%)
- How to change the login shell in Linux. chsh instruction (56.8%)
- How to set up Python as a CGI module in Apache on Debian (Ubuntu, Linux Mint) (RANDOM - 50%)
Thank you for this article. It has helped me