How To: List USB Devices

Today’s article might look like a funny headline, where the subject would be how to list USB devices. Today, we’ll have a relatively short article. It’s not complicated and you’ve already learned how to list USB devices! Wait-a-minute!

After all, you’ve already been told how to do this. In fact, I’ve written an article on this very subject! See:

A Little About The ‘lsusb’ Command.

That article covered how to list USB devices, using the lsusb command. Right?

Yes. Yes, it did.

But, this is Linux and there’s another command that doesn’t get enough attention. In fact, I’d wager (a small amount) that many of you wouldn’t have used this command before. 

What is this mystery command? It’s really easy to remember. It’s not complicated, it’s simply “usb-devices”. On the man page, the command describes itself as:

usb-devices – print USB device details

Sure enough, that’s what it does. But, unlike the ‘lsusb’ command, this command spits out a whole lot more information by default. There’s not a whole lot more to say about it, and I’m making this article extra short. So…

List USB Devices:

As implied in the opening part of this article, you’re going to need an open terminal. 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, simply run the command:

If you check the man page, you’ll find that that’s it. There’s nothing special to do with this command, you just run it. The man page contains this:

usb-devices is a (bash) shell script that can be used to display details of USB buses in the system and the devices connected to them.

It might be the easiest command you’ll ever run – and it’s also easy to remember. So, why is it so unknown? Well, we use ‘lsusb’ for listing USB devices and the command doesn’t rank well in search engines, but it’s at the bottom of many such articles. It also doesn’t do much more than list USB devices, as it’s just some sort of a built-in bit of shell scripting.

Closure:

So, I figured I’d do an extra short article today. Why not? We’ve done some longer articles lately, so we might as well try the super-short format. It helps that I didn’t dive off-topic or the like, but simply explained how to list USB devices. Do you have any thoughts on articles in this shorter format?

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

 

How To: Clear Swap

Today’s article is just going to be a quick and easy article, where we learn how to clear swap. I figured I’d do this article while swap was still fresh in my memory so that I’d not forget to write it down the road. If you use swap and want to learn how to clear swap, read on!

Again, this article is only useful for those that use a swap. There are different opinions about using swap and this article is for those who do. I just wrote an article about how to monitor swap, so we might as well learn to clear it.

What do I mean by clearing swap? I mean emptying it. I mean removing all the data held in swap, allowing for data to be written to swap again. It’s not something I worry about, but I know folks have asked about it in the past. I might just as well cover it, though it really won’t take much time.

Clear Swap:

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, you can clear swap with the following command, by turning swap off:

You then turn swap back on with:

Tada! You’re all done. If you want, you can do it all with just a one-liner:

That’s really all there is to it. It’s not terribly complicated and it’s something you might as well know if you’re going to use swap and are concerned with monitoring and clearing it.

Closure:

There you have it. I told you that it’d be short and easy. You now know how to clear swap, should you actually want to do so. You might as well know how. It’s bound to come in handy for someone.

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.

A Couple Of Ways To Monitor Swap Usage

Today’s article will be nice and easy, as we cover just a couple of ways to monitor swap usage. There are several ways to monitor swap usage, so we’ll just cover a couple of them. One of ’em is bound to work.

So, this only applies to those people who use swap. If you use the search feature, you’ll see that I’ve addressed this before and that I tend to use swap – because it’s more than just a place the kernel sticks stuff when you’ve run out of RAM.

swap is still used with plenty of RAM
See? The system happily uses swap with plenty of free rams.

As you can see, on a system with plenty of RAM – and plenty of free RAM – the system still uses swap. I figure that the kernel is smarter than I am. You do you, but I will continue using swap.

But, enough about that. If you don’t use swap, just accept that this article isn’t meant for you and move along. Tomorrow’s article might just have something useful for you. You never know!

So then, I will assume readers know enough about what swap is and will have made their own choices. This article is for those who want to monitor swap usage.

Let’s Monitor Swap Usage:

You guessed it. You’re going to need an open terminal. So, open your favorite 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, you can try the following command:

(You can just use ‘free‘ but the -m flag makes it easier to read. You can also use ‘free -h‘ if you prefer that output.)

That command should be fairly universal. You can also use the following command if you’d prefer. It’s just:

That command is pretty handy and pretty much is the same as you’d get if you just run’cat /proc/swaps‘ which is, I suppose, yet another way for you to monitor swap usage. Think of it as a bonus way to check swap usage. After all, you can’t have too many ways and one of ’em is bound to stick with you if you use it often enough.

Closure:

And there you have it. You have another article. This time, we’ve discussed how to monitor swap usage (in the terminal, of course). It’s a handy tool for those who do use swap (be it partition or swapfile). If you don’t use swap, you probably won’t get much use from this article. Maybe tomorrow will be more interesting for you?

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

NEWS: List Your LUG At A New LUG Repository

Today’s article is just going to be a brief new article where I share the news of a new LUG repository. It’s an effort to provide a centralized location for those looking to find or promote a LUG. Read on, to learn about a new LUG Repository.

What is a LUG?

A ‘LUG’ is a Linux User Group. You’ll sometimes see folks call them a GLUG, which would be a GNU/Linux User Group. A LUG is a group of Linux users that have formed an organization, often a loosely organized group, to help and inform people interested in the GNU/Linux operating system.

Though they’re not as popular as they once were, there are still many of them, though the pandemic appears to have slowed some down. They still exist and there’s no real central repository – until now.

By the way, local user groups existed long before Linux was around. The PC market was largely prompted by people who participated in groups like that, as OEMs came to realize that the niche could be profitable. Today, you’ll find people still meeting in person, meeting online, or meeting both online and in person.

The Solution:

The admin, @Rob, saw the problem – that there’s no centralized place for people to find their nearest LUG. You can use your favorite search engine and hope for the best, but finding a good repository of LUG information wasn’t realistic – and those that do exist are often woefully out of date and appear to be unmaintained. 

Because of this, the Linux.org site now has a way for you to add (or convince your LUG leaders to add) your LUG to a repository that will hopefully become a great asset for LUG-organizers and those searching for their local LUG.

If you are an organizer or can ‘speak for’ your LUG, you can add your LUG to the repository here:

Linux.org LUG Repository

To avoid abuse/spam, you will need to register to manage your LUG. Once registered, you can then manage your LUG’s information after listing it. 

The goal here isn’t to control anything but to provide a service that was otherwise lacking. So, there are no costs associated with adding your LUG to the repository. 

Disclosure:

I am ‘KGIII’ on Linux.org and am a moderator of the forum. All attempts have been made to remove any potential biases.

Closure:

There you go. There’s a bit of news. Some of my readers will come from Linux.org already, so they should already know this. However, a bunch come from elsewhere, far more than come from Linux.org, so this is aimed at those users – especially if they want to add their LUG to the LUG repository.

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

How To: Install Proprietary Drivers In Ubuntu

Today is going to be a very quick and easy article, where we learn how to install proprietary drivers in Ubuntu – in the terminal, of course. It’s easy enough for a new user, as it’s just a single command. It’s also not all that well known and not documented in the man pages or anything, so I might as well cover it here.

There are all sorts of reasons why you might want to install proprietary drivers in Ubuntu. Some of your hardware may not work at all until you do. Some of your hardware will only have partial functionality until you do install the proprietary drivers.

Of course, if everything is working just fine, you might not even need to worry about the proprietary drivers in Ubuntu. If everything is fine, there’s no reason to worry too much. You know what they say, “If it ain’t broke, don’t fix it.” 

Of course, a subset of you will say, “If it ain’t broke, tweak it!”

Anyhow, this article only applies to Ubuntu and official Ubuntu flavors. It likely also applies to Ubuntu derivatives. A quick check seems to indicate that Mint is one of those derivatives that support this command. We’ll only cover it from the Ubuntu-specific direction. If it also works for you, that’s a benefit. If it doesn’t work for your distro, the maintainers likely took it out for a reason.

So then, let’s get to work installing proprietary drivers on Ubuntu…

How To Install Proprietary Drivers In Ubuntu:

As mentioned above, we’ll be doing this in the terminal. So, you’re going to need an open terminal for this exercise. You can just press CTRL + ALT + T and your default terminal should open.

With the terminal now open, we need to ensure you have the “Restricted” repository enabled. As you already have a terminal open, we might as well do that while in the terminal. So, type the following command:

Now, you need to update your database of software that’s available and we might as well make sure all other software is up to date. You do that with this command:

There you go. You’re now ready to install proprietary drivers in Ubuntu. So, while it’s a single command, it may require some preparation for some users. If you’ve run the above commands, we should be on the same page. So, with that, you just run the following command:

If there are any prompts, just go ahead and press the Y button. Everything should go smoothly and you may need to reboot after installing the proprietary drivers. When you’ve done that, you should be using the newly installed drivers instead of the open-source (or no) drivers. 

That’s all there is to it…

Closure:

There you have it! You have another article. I know I told you that it was just a single command and then shared more than one command, but it is just one command so long as you’ve got the Restricted repository enabled already (and I think most of us do). Either way, there’s a quick and easy way to install proprietary drivers in Ubuntu, in the terminal even. ‘Snot all that difficult after all!

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 site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.