Networking

Disable WiFi From The Terminal

In today’s article, we’re going to learn how to disable WiFi from the terminal. It’s going to be a simple enough article, with just a few commands to learn. Read on, my dear readers! There’s information to share!

This is certainly a tool that new Linux users could use, you just need to remember to turn WiFi back on when/if you need wireless access again. So, read on, my dear readers, as we venture into a bit of controlling networking with the Linux terminal.

This will will show you how to completely disable WiFi, rendering you unable to connect to any wireless network. There are those folks who will see this as a security measure, as they distrust wireless connections. There are others who may view this as a battery saving measure, as you no longer will have the wireless radio polling for connections or anything like that.

The tool we’ll be using for this is ‘nmcli’. You can do a lot with this command, but the man page describes ‘nmcli’ as this:

nmcli – command-line tool for controlling NetworkManager

And, if you dig a bit deeper, you’ll see that there’s a man page for ‘NetworkManager’. This is described as:

NetworkManager – network management daemon

So, as you can see, we’re gonna be dealing with the network. That’s what I told you in the title and the introductory paragraph! See? We take this seriously! So very, very seriously!

Disable WiFi From The Terminal:

Yup. You read that right. It’s another article that requires an open terminal, so you should open a terminal now. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, let’s learn how to disable WiFi from the terminal itself. So, to disable WiFi, your command would look like:

sudo nmcli radio wifi off

Next, of course, we’ll learn to turn it back on again. That command looks like:

sudo nmcli radio wifi on

If you have other radios, such as a mobile/cellular network, you can actually enable and disable all the radios with just one command:

sudo nmcli radio all off

And to turn all the radios back on again:

sudo nmcli radio all on

And there you have it.. You can disable WiFi from the terminal. If you want to know more about ‘nmcli’ (and it’s a bit of a robust command), it’s just:

man nmcli

You can also check the ‘NetworkManager’ man page with:

man networkmanager

Closure:

There it is! It’s another article! This one does what the title says it’s going to do – it shows you how to disable WiFi from the terminal. There’s more to ‘nmcli’ and ‘networkmanager’ so maybe we’ll have another article covering some other options? It could happen!

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

View Comments

Recent Posts

A Quick Look At The Shutdown Command

This is going to be just a quick article about a command many of you…

10 hours ago

Setting Up Coding Environments on Linux for Educational Use

With so many strong attributes, such as robustness and flexibility, Linux stands as a powerful…

2 days ago

View Detailed Hardware Information

There are many tools for showing your hardware information and today we'll get to view…

4 days ago

How To: Install Wine In Lubuntu

Today's article isn't going to be complicated or long as we are going to cover…

6 days ago

Update Python Packages (PIP)

We've had a run of Python packages recently and you can tell that I'm a…

1 week ago

Save A Command’s Output To A File (While Showing It In The Terminal)

The title is the best I can come up with to describe this exercise as…

1 week ago