[ubuntu] Network management: /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf What is this file, what is it for, and how to use it?

10-globally-managed-devices.confIt is the configuration file of NetworkManager, located /usr/lib/NetworkManager/conf.d/in the directory. It is used to configure devices managed by NetworkManager globally.

NetworkManager is a daemon process that manages network connections in Linux systems. It is responsible for automatically detecting and configuring network devices, including wired connections, Wi-Fi, Bluetooth, and more. 10-globally-managed-devices.confFiles are used to define which devices should be managed globally by NetworkManager.

This configuration file usually contains the following:

[keyfile]
unmanaged-devices=none

The above configuration instructs NetworkManager to manage all devices, not to exclude any devices, that is, unmanaged-devicesthe parameter is set to none. This means that NetworkManager will be responsible for managing all network devices in the system.

You can modify the file as needed 10-globally-managed-devices.confto configure NetworkManager's global device management behavior. For example, if you want to exclude specific devices from being managed by NetworkManager, you can set unmanaged-devicesthe parameter to the corresponding device ID. Here is an example:

[keyfile]
unmanaged-devices=interface-name:eth0;interface-name:wlan0

The above configuration will make NetworkManager not manage devices named eth0and .wlan0

To use 10-globally-managed-devices.conffiles, you can follow these steps:

  1. Open a terminal or command line interface.

  2. Open the file with administrator privileges using a text editor (eg vi, nanoetc) 10-globally-managed-devices.conf:

    sudo vi /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
    
  3. Modify the configuration in the file according to your needs.

  4. Save the file and exit the editor.

  5. Restart the NetworkManager service for the changes to take effect:

    sudo systemctl restart NetworkManager
    

Note that modifying the NetworkManager configuration file may have an impact on the system's network management. Before making changes, make sure you understand the implications of your changes, and make a backup of the original configuration file in case something unexpected happens.

There is not only 10-globally-managed-devices.confone file under /usr/lib/NetworkManager/conf.d/, and the file name may also be inconsistent, but its configuration meaning is the same

like:
insert image description here

Guess you like

Origin blog.csdn.net/m0_47406832/article/details/132452367