How to disable automatic Wi-Fi connection without deleting settings in Linux
August 2, 2024
Table of Contents
1. Is it possible to disable automatic connection to Wi-Fi in Linux
2. How to disable automatic connection to Wi-Fi in Linux Mint (Cinnamon)
3. How to disable automatic connection to Wi-Fi in Ubuntu and Kali Linux (GNOME 3)
4. How to disable automatic connection to Wi-Fi in Xubuntu (Xfce)
5. How to disable automatic Wi-Fi connection in Kubuntu and Manjaro (KDE)
6. How to open the Connection Editor window (Network Connections) in the command line
7. How to disable automatic connection to Wi-Fi manually
8. How to connect to a Wi-Fi network manually
Is it possible to disable automatic connection to Wi-Fi in Linux
If you want your Linux computer to not automatically connect to certain Wi-Fi networks, but you do not want to delete their settings (to connect later or to connect only manually) and at the same time you want the computer to connect to all other Wi-Fi access points, then this instruction will help you configure network connections.
This instruction will show how to prohibit connection to certain access points or to all wireless networks at once without disabling the Wi-Fi adapter and deleting the wireless network settings.
Since the described method allows you to save the settings, you can connect to saved access points or enable automatic connection at any time. In this case, you do not need to enter a password or other settings, since all this information is already stored in the OS.
How to disable automatic connection to Wi-Fi in Linux Mint (Cinnamon)
Click on the “Network Manager” applet and select “Network Connections”.
Or, in the command line, run the command:
nm-connection-editor
Select the network for which you want to disable automatic connection and then click the gear.
In the window that opens, switch to the “General” tab.
Uncheck the “Connect automatically with priority” setting.
Click the “Save” button.
You can repeat the described procedure for other Wi-Fi networks for which you want to prohibit automatic connection to access points. You can perform this procedure for all wireless networks.
How to disable automatic connection to Wi-Fi in Ubuntu and Kali Linux (GNOME 3)
I did not find how to open the network connection editor in GNOME 3. However, all the necessary packages for editing the priority of Wi-Fi connections in GNOME 3 are already available. But you need to start by opening a console (terminal).
In the command line, run the command:
nm-connection-editor
Pay attention to the Wi-Fi networks in the window that opens:
Select the network for which you want to cancel automatic connection and then click the gear.
In the window that opens, switch to the “General” tab.
Uncheck the “Connect automatically with priority” setting.
Click the “Save” button.
How to disable automatic connection to Wi-Fi in Xubuntu (Xfce)
Right-click on the network connections icon (this can be a patch cord or a wireless network) and select “Connection settings”.
Select the network for which you want to cancel automatic connection and then click the gear.
In the window that opens, switch to the “General” tab.
Uncheck the “Connect automatically with priority” setting.
Click the “Save” button.
If you do not have nm-connection-editor installed on your system, you can install this program, as this program works in Cinnamon, Mate, GNOME 3, KDE and Xfce.
To install nm-connection-editor on Debian-based distributions (Ubuntu, Kali Linux, Linux Mint), run the command:
sudo apt install network-manager-gnome
To install nm-connection-editor on Arch Linux-based distributions (Manjaro, BlackArch), run the command:
sudo pacman -S nm-connection-editor
After installing this program, you can quickly proceed to configuring network connections, including their priority, by running in the command line:
nm-connection-editor
How to disable automatic Wi-Fi connection in Kubuntu and Manjaro (KDE)
The KDE desktop environment can be used by Manjaro, Kali Linux, Kubuntu and other distributions.
Right-click on the “Network Connection” applet and select “Manage Network Connections…”.
In the Wi-Fi section, select the network for which you want to disable automatic connection.
Switch to the “General configuration” tab.
Uncheck the “Connect automatically with priority” option.
Click the “Apply” button.
You can optionally install nm-connection-editor, as this program works in Cinnamon, Mate, GNOME 3, KDE, and Xfce.
To install nm-connection-editor on Debian-based distributions (Ubuntu, Kali Linux, Linux Mint), run the command:
sudo apt install network-manager-gnome
To install nm-connection-editor on Arch Linux-based distributions (Manjaro, BlackArch), run the command:
sudo pacman -S nm-connection-editor
After installing this program, you can quickly proceed to configuring network connections, including deactivating them, by running in the command line:
nm-connection-editor
How to open the Connection Editor window (Network Connections) in the command line
With all the variety of distributions and desktop environments, in all Linux OS we used the same program with a graphical interface. Sometimes this program can be opened using the Network Manager → Network Connections applet, but sometimes there are no links to it in the graphical interface.
In any case, you can use the command line to open the desired application as quickly as possible:
nm-connection-editor
This command works in most distributions.
The nm-connection-editor program works in Cinnamon, Mate, GNOME 3, KDE and Xfce. Some of these desktop environments may already have the program pre-installed.
If you have a different desktop environment, you can try installing this program and using it.
To install nm-connection-editor on Debian-based distributions, run the command:
sudo apt install network-manager-gnome
To install nm-connection-editor on Arch Linux-based distributions, run the command:
sudo pacman -S nm-connection-editor
After installing this program, you can quickly proceed to configuring network connections, including deactivating them, by running in the command line:
nm-connection-editor
How to disable automatic connection to Wi-Fi manually
Files with network connection settings are located in the /etc/NetworkManager/system-connections/ directory. If desired, you can manually edit these files.
To do this, open the file with the Wi-Fi network settings for which you want to disable automatic connection, and in the section:
[connection]
Add the line:
autoconnect=false
Save and close the file.
How to connect to a Wi-Fi network manually
You can connect to a network at any time for which automatic connection is disabled. In this case, you will not have to re-enter the password and other settings, since they are saved. To connect, click on the network icon and select the desired network to connect to.
If you want to re-enable automatic connection to certain or all networks, then open the network settings as shown above and check the box for the “Connect automatically with priority” setting.
Related articles:
- How to prioritize Wi-Fi connections in Linux (100%)
- How to view the password for a Wi-Fi connection in Linux (100%)
- How to delete Wi-Fi network settings in Linux (100%)
- How to migrate from X11 to Wayland? (64.5%)
- How to prevent NetworkManager from managing a specific interface? (SOLVED) (58%)
- How to copy a table in phpMyAdmin (RANDOM - 50%)