To modify a persistent connection using nmcli command-line tool, follow these steps:

  1. Open a terminal window.

  2. List all the available connections and find the connection you want to modify by running the following command:

    nmcli connection show
    
  3. Identify the connection name or UUID that you want to modify.

  4. Use the nmcli conn modify command along with the connection name or UUID to modify the connection. For example, if the connection name is "MyConnection", run the following command:

    sudo nmcli conn modify MyConnection <options>
    

    Replace <options> with the specific parameters you want to modify. Some commonly used options include:

    • connection.autoconnect yes|no to enable or disable automatic connection.
    • ipv4.method manual|auto to set the IPv4 addressing method.
    • ipv4.addresses IP_ADDRESS[/PREFIX] to set the IPv4 address and subnet mask.
    • ipv4.gateway IP_ADDRESS to set the IPv4 gateway.
    • ipv4.dns IP_ADDRESS1 IP_ADDRESS2 to set the IPv4 DNS servers.

    You can modify other options as per your requirement. Refer to the nmcli manual for more details on available options.

  5. After modifying the connection, save the changes by running the following command:

    sudo nmcli conn up MyConnection
    

    Replace "MyConnection" with the actual connection name or UUID.

Note: The nmcli commands require superuser privileges, so you may need to prefix them with sudo.

By following these steps, you can successfully modify a persistent connection using nmcli

how make nmcli conn modify persistent

原文地址: http://www.cveoy.top/t/topic/iU3d 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录