List All The Groups In Linux

This is going to be a simple enough article where we list all the groups in Linux – specifically your Linux. (Your list of groups may not be the same as my list of groups, of course.) This isn’t complicated but might be important to some of you, so we might as well write about it.

I’ve often mentioned that Linux is a true multi-user operating system. That is, you have many users, each with assigned tasks and permissions. You have users for everything from root to printing.

Well, along those same lines, Linux also uses groups. You can not only set permissions on a per-user basis, you can set permissions on a per-group basis. Any member belonging to that group will have the same permissions as that group.

A good example is ‘sudo‘. That’s a group you likely belong to. Because you belong to the sudo group you have access to the sudo command. This lets you have elevated permissions to perform various operations on your system. Make sense?

We’ll be using a new tool for this…

getent:

The getent command is used to read various databases. This is fine because ‘groups’ is one of the databases that getent can read. You won’t need to install anything to run this command.

You can check the man page with this command:

From there, you’ll see that getent is described like so:

getent – get entries from Name Service Switch libraries

So, it’s a database reading tool more than anything else.

If you’d like an easier way, we’ll do the same with the cat command.

cat:

I really shouldn’t have to describe the cat command. We’ve used it plenty of times. It takes the contents of a file and spits them out to your terminal (standard output). It’s an oft-used tool in the Linux world. Once again, you won’t have to install anything.

You can check the man page with this command:

At that point, you’ll see that the cat command is described like this:

cat – concatenate files and print on the standard output

See? It’s the correct tool for the job. We want to take the contents of a file and read it in the terminal. The cat command is perfect for that.

I’ll show you how to list all the groups in Linux with both commands. You can pick your favorite and just use that command. Either command will work just fine for this job.

List All The Groups In Linux:

If it wasn’t obvious from the above, this is yet another task for the terminal. If you don’t have an open terminal, you can probably open one by pressing CTRL + ALT + T. If that doesn’t work, find the terminal in your application menu and click it.

With your terminal open, run the following command:

While not of much use, here’s an example output:

You can get the same output with the cat command. That might be easier to remember for newer users. After all, you should be familiar with the cat command. That command is simple enough.

That will give you the same results as the ‘getent’ command above. Obviously, the group name is the first column.

I’m not sure where I learned this, but you can just list the first field and get a list of groups without any additional information. Just use this command:

That’s not nearly as useful as it could be, but I figured I’d share.

Closure:

Well, if you wanted to list all the groups in Linux, you now know how to do so. If you didn’t know about groups, you now know that you have groups and how to list them. So, you might as well add that to your notes and keep it in mind. (The groups subject may appear in a future article!)

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 the DNS Cache

Today’s article will be a nice and easy article where we learn how to clear the DNS cache as a simple exercise. This isn’t very difficult and won’t take too much time, so this article should be relatively short.

If you don’t know what DNS cache is, that’s fine. I’ll do my best to explain.

Chances are good that you do not need to clear your DNS cache. This isn’t something you’ll need to do all that often, maybe not ever. I only clear the DNS cache when I need to.

What is DNS?

DNS stands for Domain Name Service. When you type a domain name into your browser’s address bar, it relies on an IP address behind the scenes. DNS is the interface between those two.

You can think of DNS like a phone book, translating names to numbers.

While not important, a single IP address can host many websites. So, think of DNS as the phone book and nameservers are like the names of people who live in the same apartment complex.

As you browse, your computer tries to save you some time. It saves a cache of DNS hits. It saves a cache of domain names and their IP addresses. With a speedy connection, you won’t notice this as much today. However, it’s meant to speed up browsing when you revisit a site you’ve already visited.

Make sense? 

Let’s say you’re like me and have a website. For reasons, you decide to change your hosting company. You do so and update the nameservers. You now have a new IP address for your domain name, at least you will when the changes propagate.

Suddenly, you have an old IP address cached for that domain name. Because it is in the cache, your system won’t look that address up again. What do you do to get access to the site again?

Clear DNS Cache:

We’ll learn to clear the DNS cache in the terminal. In fact, I don’t know of a GUI way to do this for the system. (It’s possible to clear the DNS cache in Chrome via a GUI.) So, open a terminal. Many of you can just press CTRL + ALT + T and your default terminal will pop open.

With your terminal now open, enter one of the following commands to see the state of affairs regarding your DNS cache:

Or:

One of those two commands should work for you.

Here’s an example output:

Now, let’s clear that cache.

One of the following commands should work for you:

Or:

There won’t be any output from that command to confirm that the cache has been cleared. If you run the first command all over again, you should see something like this after you’ve run the command:

See? It’s pretty easy to clear the DNS cache!

Closure:

This is only something a few people will need to do. If you’re having issues visiting a site you recently were able to access without issue then this might be something you try. You can try to clear the DNS cache to see if it helps but there are a million and ten reasons why a site may suddenly be down and DNS is unlikely to be the issue unless you have a specific reason to expect this particular problem and solution.

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.

Legitimate Reasons To Not Use Linux

Today’s article is going to be something my regular readers wouldn’t expect as we discuss legitimate reasons to not use Linux. Like it or not, people have reasons not to use Linux. I’ll cover some of them that I think are more legitimate than other reasons.

I think I’ll link to these first:

Top 10 Reasons Why I Use Linux
Why I Use Linux
What it’s Like To Beta-test Linux, Specifically Lubuntu

I share those three links because I think it should be obvious that I’m a Linux fanboy. I love and use Linux because I think it’s the best operating system for me. 

At the same time, I realize that Linux may not be your choice. I think there are some legitimate reasons to not use Linux. There are other reasons with less legitimacy (that is reasons based on fallacies) and we’ll avoid those in this article. Instead, we’ll cover reasons with legitimacy.

Legitimate Reasons To Not Use Linux:

I’ll cover the legitimate reasons to not use Linux that I can think of. After you read them, you can leave a comment agreeing with them or disagreeing with them. You can also add your reasons. If those reasons are any good (and I have both time and motivation) I’ll add them to the article. So, if you’re going to comment on an article, let this be one you feel especially welcome to do so.

#1. You rely on software that will not work with Linux.

This one is pretty basic. There’s software that will not work with Linux. Yes, it might work in Wine, but it may not work in Linux at all. This is the cold hard truth and if you need that software then you’re not going to be interested in moving to Linux.

#2. You’re heavily invested in Microsoft.

Let’s say that you use MSFT for everything, from office to desktop. Sure, you could switch. Linux has equivalents to almost everything MSFT offers. But, you pay for your Office365 and similar, you might use their gaming hardware, etc…

While you can switch, it may be harder than it would be for those people who are more software-agnostic. You simply don’t want to put in that effort. You simply don’t see a need to put in that effort.

This applies to Apple users as well. If you’re heavily invested in the Apple ecosystem, you may not want to switch to Linux. It could also apply to BSD users, Unix users, etc…

#3. You play modern games.

Yes, many games are available on Linux. These days, we can install Steam and play thousands of games on Linux. However, you’ll find that quite a few games will simply not work with Linux. You’ll find that they won’t work with Wine. That’s just the sad case of affairs.

Perhaps you could get a console that you’re happy with and switch to Linux while not always playing the latest and greatest games? More and more games are being developed with Linux compatibility so this may change in time.

#4. You’re happy with Windows.

This one is similar to those who are invested in Windows. However, those people who are invested heavily in the MSFT ecosystem may not be happy, they’re just entrenched. This is for those folk who are just plain happy with Linux. They know the differences. They understand reality. Linux just isn’t something they’re interested in because they’re happy with Linux.

#5. You’re learning disabled.

I am not saying that the learning disabled can’t learn how to use Linux. However, a person may have invested enough time learning to use Windows and may not want to invest time and effort learning a new operating system.

Think of someone who is elderly and has learned to navigate the Windows environment. Maybe they have a little cognitive problem and they no longer retain things as well as they once did. Sure, they could learn to use Linux but they may have better things to do with their time.

Speaking of time…

#6. You lack the time to learn Linux.

Let’s face it, many people are now working two jobs just to pay the rent and have enough to eat. Maybe they don’t work extra jobs but have hobbies that take up their time. Sure, we have computer hobbies but they may have hobbies that don’t involve technology. There are any number of reasons why you simply don’t have time to learn to use Linux.

#7. You’re just not interested in learning to use Linux.

You’ve already learned enough about Linux. You know about all the various choices. You know how easy it can be to get into Linux but you just don’t care. That’s okay! It’s perfectly okay to not be interested in learning to use Linux. If you’re happy with proprietary software, that’s your choice. This entry is for the person who is aware of Linux, the ease of Linux, and just doesn’t care to learn.

#8. You have hardware that will not work on Linux.

It’s possible that you have hardware that simply will not work on Linux. No amount of goodwill and happy thoughts is going to change this. The hardware vendor doesn’t support Linux and has no plans to support Linux in the future. While that’s unfortunate, if you need that hardware to do your computational tasks then it’s perfectly okay to not use Linux.

This can also be true with ‘bleeding-edge’ hardware. If you’re interested in using (for example) the latest and greatest graphics card, Linux may not offer any support. It could be a while before you get even basic support for that hardware. The devs need to figure out how to make it work with Linux and that takes time.

#9. You do not own the hardware.

If you share the hardware with other users, they may not appreciate it if you install Linux. They may not be interested in that. Yes, you could use virtual machines and live instances run from an external drive, but many people don’t find those experiences satisfactory.

This is especially true if you’re still a kid. Your parents aren’t going to be all that happy if they go to use the computer only to find out that you’ve installed a completely different operating system. Instead, look for a second device that you can call your own. Until then, it’s okay to give Linux a pass.

#10. <Insert Your Reasons To Not Use Linux Here>

What did I forget? How many other reasons can you think of? I tried to cover as many reasons to not use Linux as I could think of. I’m sure there are other reasons, so now’s a fine time to add them as a comment.

Closure:

So, I figured I’d write a different article. This time, I wrote about legitimate reasons to not use Linux. Frankly, there are legitimate reasons why a person may decide to not use Linux. I suspect many people could use Linux who do not currently use Linux, but there are legitimate reasons why they may choose not to.

So long as they’re making an informed and honest decision, I think that’s just fine. I’m perfectly okay with the fact that other people don’t use Linux. I’ve never lost a minute’s worth of sleep over the fact that people use software that I don’t like. I don’t even invest the time to argue with them. I just hope that they’re making their choices from an informed position and that they know the reality and benefits of using Linux.

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.

Meta: The State Of Linux Tips #23

Today’s article is just a meta article, an article that I fail to write every month. The more astute readers of this site will see the #23 and realize how bad I am at keeping to a schedule. Writing meta articles isn’t fun. Writing meta articles doesn’t result in sharing valuable information. These meta articles cover the state of Linux Tips. That’s it.

So, things are going well… Things are going very well from many perspectives. Things are going better than ever!

Why not just throw some data…

For the past year or so, I’ve used a browser extension that helps me write better. It also has a weird feature that sends a weekly message that lets you know how you’re doing. I’ve not yet shared that data, so let’s share that!

Some Meta Stats:

This is just for the past week…

I wrote more than 91% of the rest of the users.
At the same time, I was more accurate than 73% of their users.
For better or worse, I used more unique words than their other users at 93%.

Amusingly, I used about 3500 unique words in the past week and that’s somehow enough unique words to stand out. I didn’t think my vocabulary was that expansive, but I’m constantly assured it is.

Anyhow, my “tone”, as determined by the plugin…

I’m 19% informative.
I am also 17% assertive.
Then, I guess I’m 13% direct and 10% confident.

I have no idea how they came up with those numbers.

Anyhow, there are some writing stats. Keep in mind that I write for more than just this site. I write a lot of text elsewhere. 

Some Site Numbers:

So, we’ve seen some income in sponsored articles, which is nice. Not relying on Google is okay. It’s less income than Google was, but at least you’re not currently wading through ads. We may have ads again in the future, so we’ll have to wait and see. If you don’t want to see ads, you can always donate. 🙂 

We’re currently averaging over 1,000 visits per day. I’ve noticed that we surge ahead and then sort of taper off. It’s like we have some record-breaking months and then we slowly taper off just a little. Then, we have new record months. Last month was not a record-setting month but it was still well over 1,000 visits per day.

Most of my traffic comes from the United States – which would be expected.
You tend to visit for 228 seconds each time you visit.
The average viewer is using Chrome, Chromium, or a Chromium derivative.

These are the most popular pages:

How To: Remove AppArmor From Ubuntu
How To: Convert JPG to PNG
How To: Disable Sleep And Hibernation on Ubuntu Server

Those change around a little but they seem to be the most common.

For the record, most of my traffic comes from Google.
That’s followed by DuckDuckGo.
The next is traffic from Linux.org.

About 92% of you are using Linux already.
Less than 4% of you are using Linux.
Just about 3% of you are using a Mac.

So, those numbers make perfectly good sense. Getting good numbers from your statistics isn’t an easy task. Various stat applications excel at different things. But, those numbers are fairly similar to what I see elsewhere.

Closure:

That’s right. This was just a meta article. Things are going okay, or at least way better than I ever expected. I don’t have any sponsored articles lined up so we’ll have to see how that goes this month. I’ve changed my policy quite a bit, letting folks know that I can be flexible. So, we’ll see what happens.

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.

Is Your Storage Drive An SSD Or An HDD?

Today’s article aims to answer a simple question, simply is your storage drive an SSD or an HDD? This is not something most folks will have trouble knowing, but it’s still something worth knowing how to do. After all, you never know when you’ll be attached to a remote computer with disks of different types.

And, yes, due to expense and sizes, HDDs still exist and are still in use all over the place. Not everything has been converted to an SSD.

We’ve relied on spinning media for quite some time. We used this in hard disk drives. They were the norm for many years. SSDs (solid-state drives) are more common in end-user computers these days. If you can, you might even have an NVME SSD which is exceptionally fast.

We’re only going to use one command in this article, so it will be quite short. That’s not a bad thing. Not every article needs to be all that long.

We’ll simply be using the cat command. We’ve used this command many times in the past because it’s a handy command to use!

cat:

The cat command is a command used in the terminal. We want to read a file and cat is the correct tool for the job. The cat command reads a file and sends the output to the terminal. You won’t need to install anything.

Let’s check the man page (with man cat) to see:

cat – concatenate files and print on the standard output

See? If we want to read a file to the terminal, this is the correct tool for the job. Again, you won’t need to install anything.

An SSD Or An HDD:

Like oh so many articles, you will need an open terminal. Just press CTRL + ALT + T and your default terminal should open.

With your terminal open, let’s see if you’ve got an SSD or an HDD.

First, identify your drives with this command:

Now, ignoring the partitions, you can run the following command:

So, for example, you’d run this command:

And here’s an example output:

The zero means that it’s an SSD. 

If we run this command against a drive that I know is an HDD (a plugged-in external HDD that’s used for backups and storage):

The 1 means that it is a spinning HDD.

So, if you have both you can now distinguish between an SSD and an HDD.

Closure:

So, now you know how to tell if your device is an SSD or an HDD. This is something easily determined. If you have questions about your storage, this will help answer those questions. I’m not sure that I’d memorize this command, but it’s worth adding to your notes.

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.

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.