To disable WiFi from the command line in Fedora, you can use the nmcli (NetworkManager command-line interface) or directly control the network interface via ip or ifconfig commands. Here's how to do it with nmcli, which is the recommended way since Fedora uses NetworkManager by default:
Using nmcli to Disable WiFi List Available Network Interfaces: First, identify your WiFi interface by listing all network interfaces. Open a terminal and type:
nmcli device status
Look for the device type "wifi" in the output. The interface name is typically something like wlp2s0 or wlan0.
Turn Off the WiFi Device: Use the nmcli command to disable the WiFi device. Replace wlan0 with your actual WiFi interface name from the previous step:
sudo nmcli device disconnect wlan0
This command disconnects the WiFi interface but doesn't prevent it from reconnecting on the next boot.
Permanently Disable WiFi: If you want to prevent the WiFi from enabling on boot, you can set the WiFi to be disabled by default in NetworkManager:
sudo nmcli radio wifi off
This command turns off the WiFi radio, effectively disabling WiFi until you turn it back on with sudo nmcli radio wifi on.
To turn back on
sudo nmcli radio wifi on
Help
sudo nmcli radio help
sudo nmcli radio wifi help