To disable wireless networking (Wi-Fi) in Linux, you can use the nmcli
command. This command allows you to manage Network Manager, which is a service that handles networking in most modern Linux distributions.
To disable Wi-Fi using nmcli
, follow these steps:
Open a terminal window.
Use the nmcli
command to turn off the Wi-Fi interface:
nmcli radio wifi off
This will disable the Wi-Fi interface and turn off the wireless radio.
nmcli
command with the device
option:nmcli device
This will list all available network devices, along with their status. The Wi-Fi interface should be listed as "unavailable".
To re-enable the Wi-Fi interface, use the nmcli
command to turn the wireless radio back on:
nmcli radio wifi on
This will enable the Wi-Fi interface and turn on the wireless radio.
Note that the nmcli
command requires root privileges, so you may need to use the sudo
command to execute it.
sudo nmcli radio wifi off