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:

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

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

And to turn all the radios back on again:

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:

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

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.

Show A Random Fortune When You Open Your Terminal

In today’s article, which should be a short one, we’re going to learn how to show a random fortune when you open your terminal. This should be pretty quick and easy, easy enough for anyone to follow. Read on, my delightful readers!

NOTE: You gotta be using bash for this, as evidenced by the use of ~/.bashrc.

Why this article? Well, I am having some connectivity issues and I want to ensure I get you a nice article while I have the connection to do so. I don’t want to count on enough time to write a longer article.

Besides, it’s another good day for a fun article. I am 99% confident that this article will teach you nothing of value! And that’s okay. It’s just you having fun – and having fun is always a good idea. So, this article will just be a bit more of that, some more fun…

First, you should read the previous article and follow the directions. That’s gonna be necessary for the next part. After all, you can’t get a random fortune when you open your terminal unless you’ve installed some software to do that. So, read this article:

How To: Display Your Fortune In The Terminal

Did you read that? Did you install ‘fortune’? Good… Now we can get into this article!

How To: Show A Random Fortune When You Open The Terminal:

Sorry about the ugly headline. Gotta optimize for Google, I guess.

This article requires an open terminal, like oh so many other articles on this site. Just press CTRL + ALT + T and your default terminal should open.

With your terminal now open, we’re going to edit the ~/.bashrc file to make it show a fortune when you open the terminal. We’ll be using nano to do so, and that’s an easy enough process.

NOTE: You don’t need sudo for this, as you already own this file.

With nano opening your ~/.bashrc file for editing, you just need to scroll to the very bottom. When you get to the bottom of the file, just add the following line:

Next, you need to save the file. To save the file with nano, press CTRL + X, then Y, and then ENTER.

Now, you need to reload your bash profile. That looks like:

Now, that should reload the terminal and profile, showing you a ‘fortune’ quote. If you want to be really sure, or if doesn’t show you a fortune, just close your terminal and open it back up again. When you open your terminal again, it should definitely show you a fortune. See? Pretty easy! It’s darned near magical!

Closure:

And there you have it. You now know how to show a random fortune when you open your terminal. ‘Snot all that hard, now is it? If I’ve gotta bang out an article with intermittent connectivity, we might as well have fun with it! Thanks for reading and we’ll get some more serious content coming up – or will we?!? I should have decent connectivity soon. It can’t stay down forever, can it?

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.

How To: Display Your Fortune In The Terminal

Today’s article is just a silly article, one where you learn how to display your fortune in the terminal. It’ll be fun! It’ll also be quick and easy, probably. If you’re expecting anything serious, this is not the article for you. No… No, it is not!

Once in a while, we remember that all work and no play makes Jack a dull boy. Well, we don’t want to be a dull boy, so let’s do something that serves absolutely no benefit. Let’s just have unadulterated fun. It’s my site, I’ll do what I want!

To be fair, I’ve already cover this same topic. I shared how to use ‘cowsay’ with ‘fortune’. I suppose it’s cheating, but this time we’re just going to use the ‘fortune‘ aspect. Trust me, it’s a very different article.

Yes, it’s an excuse to have a quick and easy article. I had an easy article the last time and I still want an easy article. I don’t want to burnout and we’ve had more than 300 articles. So, an easy spell is nice. It’ll help prevent burnout. I’ll be over it in a day or two, I assume. (Note that I didn’t promise.)

Remember, a goal of the site is to be found by search. So, having a ‘fortune’ specific article isn’t a bad thing. Not everyone will want the silliness of ‘cowsay‘. (They not very fun people, but they’re people and they exist!)

So then, let’s just get going with the silliness…

Display Your Fortune In The Terminal:

Obviously, you need an open terminal! It’s right there in the title! 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 open, you need to install ‘fortune’. It’s probably available for those using apt and those using rpm based package managers. It may be available for others, but I have not checked. So, to install it:

On apt-based distros:

On rpm-based distros:

With ‘fortune’ happily installed, and feel free to try in other package managers – but leave a comment if they work, you can start with the basic ‘fortune’ command:

Now, as this is just a fun article, I’m actually going to cheat. I’m going to suggest you just use the man page to learn more:

See, this is why I wanted to cover ‘fortune’ by itself. There are a whole lot of options available for such a silly program. Of all of them, my favorite one is the -l flag. That one throws out longer fortunes, like this one:

See?!? The ‘fortune’ command is pure awesomeness! If you’re anything like a cat, or myself, you can bat at the fortune command (as though it was a balled up piece of paper) for way longer than what seems reasonable.

So, check that man page and have fun with ‘fortune’. For example, you can (with the default configuration – and you can do way more with ‘fortune’ than one might ever possibly wish) run one of the following commands:

So, have fun with it. I do! I revisit the command far more often than one might think a grown adult would. Even then, and my memory kinda sucks, I don’t think I’ve read them all. It’s a gift that keeps on giving.

Closure:

And there you have it… You can now display your fortune in the terminal. I mean, it’s probably not really your fortune – but that doesn’t mean you can’t have some fun with it. Life is short, but not too short to have some fun in the Linux terminal.

By the way, like the last article, this article was prompted by an recent article on a forum I frequent. Nobody mentioned the ‘fortune’ command, so I figured I’d return to it and try to give it some justice. It’s a fun application with way more  options than it needs – and that’s awesome.

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.

Find A Command’s Binary

Today’s article should actually be fairly short and simple, as we learn how to find a command’s binary. For those of you who are new, I’ll do what I can to make this more clear. At the end of the day, all should become clear and it really shouldn’t take all that long.

So, when you run a command in the terminal, you’re calling the binary file that is that program. This is also true when you’re starting a command in a GUI environment. You’re loading a binary file. Well, no… You could be loading some sort of script – but most of the time you’re going to be loading a binary.

Well, what we’re going to do is show you where to find these binaries by using the ‘which’ command in the terminal.

HINT: They’re generally tucked away in /usr/bin/!

The command we’ll be using is the ‘which’ command. It’s a very simple command to use when you just want to find a command’s binary. If you run the ‘man which‘ command (not the sandwich made from burger) you’ll find it is described accurately, and as thus:

which – locate a command

And, that’s really all the command we need for this exercise. It’s dirt simple, but still worthy of its own article. Ready?

How To: Find A Command’s Binary:

Yup. You guessed it. We’ll be using the terminal for this article. We do that a lot at this site. So, open up your default terminal emulator. 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, try any one of the following:

Or:

Perhaps:

That’s right, the entire usage is just:

It even works for proprietary things, like:

If you want to be more curious, you can even find the binary for the very ‘which’ we’re using in this article:

See? This is so dirt simple that an absolute n00b can be up and using the ‘which’ command pretty much instantly! Using the terminal doesn’t have to be complicated. You can get comfortable using the terminal in just a few days and you’ll be better for it.

Closure:

So, yeah, that’s all the article you really need when your goal is to find a command’s binary file. It’s not even a wee bit difficult – and is a great way to explore the terminal when you’re new to it. Have fun!

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.

Monitor Bandwidth With nload

Today’s article should be fairly quick and simple, as we learn to monitor bandwidth with nload. It’s a handy tool that’s generally available across the many distros and is something you might find useful in your daily Linux journey.

You may also recall this article:

‘vnStat’ A Tool For Monitoring Your Bandwidth Usage

Well, today we’ll be learning how to monitor bandwidth with nload. You’ll find that nload has some visual similarities with vnStat – but nload doesn’t do logging. It’s a way to monitor your bandwidth in real time and, of course, in the terminal!

We do lots of fun stuff in the terminal! I didn’t actually expect so many articles to be terminal-based when I first started the site. Maybe I just hate taking screenshots?!?

Anyhow, this article will be published on a Sunday. It’s a weekend article, so it’s we can have a little fun with it. I’ll even keep it relatively short. You’re welcome!

So then, let’s just jump into the article…

Monitor Bandwidth With nload:

This article requires an open terminal, like many other articles on this site. 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 go ahead and install nload. It should be in your default repositories, so it’d be installed with something like:

Fedora:

Debian/Ubuntu:

Etc… Fill in the above for your distro. You’ll find that nload defines itself as:

nload – displays the current network usage

With nload installed, you can simply start it with:

That will load all of your network adapters and you use your arrow keys to navigate between the network adapters. It should automatically find all your network adapters, so you don’t need to configure it to do so.

If you want to see the nload options available, press F2 where you’ll find you have some options available, including how long it takes for the application to find the averages.

If you want to monitor the bandwidth of just a single adapter, that command is actually really simple – it’s just:

For example, and using an an oft used Linux adapter name:

That’s about it, other than learning how to close the application. That may not be obvious to everyone, you can use Q or you can press CTRL + C to close out nload.

Closure:

And that is it, really. The article doesn’t really need more details to show you how to monitor bandwidth with nload. It’s quite a simple program and the output is entirely intuitive for even a rank Linux beginner. Enjoy your weekend!

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.

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.