Solve the problem that network configuration cannot be changed and saved under Linux

When using Ubuntu for daily work, sometimes you need to change network configuration information and save it. There are related menus under Gnome that can be set. Under certain circumstances, if you change and save, you will find that the save button is grayed out and cannot be operated.

This problem also exists under labwc, which uses NetworkManager. What is even more embarrassing than Gnome is that there is no GUI menu to set the network by default.

In this situation, I use the command line interface related to nm tui to connect to the network every time. The frequency of network changes is not high and is within the acceptable range.

This article records how to check the cause and solve the problem when you cannot save network link changes in the terminal.

1. Phenomenon description

Enter the command in the terminal

1nmtui-edit

The tui configuration interface will pop up

nmtui-edit

Suppose I want to change the WI-FI network password or encryption method, and find that the tab switch cannot be above the save button. At this time, the solution that can be thought of may be to study the related configuration syntax of nm.

There is no doubt that various parameters will be extremely complex. Generally, the Wi-Fi network of a company also involves the configuration of certificates, which is even more difficult.

The situation I encountered is that the company needs to change the password regularly, and the password cannot be saved after the change. Even if I directly change the password in the configuration file, NetworkManager still reads the old password.

There is no way out, so I asked Google with the keyword nmcli edit can't save, and the records returned include [Solution](https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug /737615)

nmcli-save-about

Problem reporting time: 2011-03-18

The latest time for the community to reply to questions: 2017-09-14

The last time the author encountered this problem: 2024-03-19

The time when readers found my article: xxxx-xx-xx

This is the daily life of Linux users, kernel + GNU tool set + some reliable software + some unreliable software, who is to blame? Maybe there are only a few people who maintain this tui tool without any remuneration, and they sacrifice their time with their loved ones or their spare time.

After all, Linux is free, and you can always learn some strange knowledge after using it for a long time. There is no record of this knowledge in the Chinese world, at least I haven't found it.

In order to enrich the Chinese world, we must shoulder this small burden. We cannot carry wheat on the mountain road without changing our shoulders. We can only code some square characters.

2. Solution

Execute from command line

1nm-connection-editor

This tool command can help you print out where the problem is (see number 1 in the figure below). For example, as shown in the figure below, in my case, the place number 2 was not checked, causing the button to be inoperable.

nm-connection-editor

After checking it, there will be an additional prompt in the command line that the verification can be saved.

nm-connection-checked

Everyone will ask, why not prompt it directly on the interface? Maybe the scenario where the author uses Wi-Fi is not so complicated (certificate is required), and the interface notification is not easy to implement. Anyway, I don’t know why 😅.

In fact, there is no such check option on the tui interface. Looking at the help documentation of nmtui-edit, you will see: It provides similar functionality as nm-connection-editor.

It can be seen that nmtui-edit is a younger brother, and nm-connection-editor has to appear in an emergency, which is the difference between Bajie and Wukong.

3. Summary

In short, any time you find yourself unable to save network configuration information, you can try nm-connection-editor. It will give you some useful tips. Find a way to solve the problem in the prompts, and you should be able to save the changes.

The system is free and powerful, and you can also learn knowledge along the way. No money is given, but the experience is not that good.

A real auto parts shop master never complains about a car with many minor problems.

It doesn’t cost money, it’s time consuming, there’s nothing wrong with it.

Lastmod: Wednesday, March 20, 2024

See Also:

Translations: