Short: Show The Groups You Belong To

Today’s article, as was indicated in the title, is a short article where we learn how to show the groups you belong to. It’s just a simple command, so we’ll toss in some extra knowledge. But, this is just a short article. You won’t have much to do in this article.

The latest article explained groups and can be read by clicking this link:

List All The Groups In Linux

The last article explained how to list all the available groups in Linux. This one will explain all the groups your user account belongs to. If you want to know the groups you belong to, it’s simple enough.

If you didn’t read the article, Linux is a multi-user operating system. There are also groups. A user can belong to multiple groups and have permissions matching those groups. The example I gave in the previous article was the sudoers group. You (probably) belong to that group, giving you access to the sudo command. That is how you have elevated permissions for your account, which is quite different than using the root account.

Even if you don’t know this, you’re almost certainly a member of multiple groups. In the previous article, we learned how to show those groups and today we’ll learn how to show the groups you belong to.

Show The Groups You Belong To:

If you want to show the groups you belong to, you’ll need to have an open terminal. Just press CTRL + ALT + T and your default terminal should open. Otherwise, open a terminal from your application menu.

With your terminal open, you can show the groups you belong to with this command:

Your output will be different but here’s an example:

This also works with other users. Here’s the syntax:

That will show the groups that the user belongs to. It’s a pretty simple thing to learn and a pretty handy thing to learn. It’s so simple and easy that this is an intentionally short article.

Closure:

There you have it… It’s a short article but showing the groups you belong to isn’t a complicated affair. This is something anyone can do and there’s no reason to make the article longer than it already is. While I could make it longer, it’d be wasting my time and your time. It’s just that easy.

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.

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.

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.

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.

Short: The Halt Command

Today’s article is intentionally short because we’re simply going to learn about the basics of the halt command. There won’t be much to this article, because there doesn’t need to be.

If you have a Linux system, you can access the halt command. The halt command is one of the commands used for power management but not one you’re likely to use. You’re more likely to run reboot or shutdown command.

Why the halt command? Well, it’s archaic these days. I really can’t think of all that many, or any really, reasons to use it. I’m told you can use this command for low-level maintenance but I’ve never been able to use that for anything.

The Halt Command:

Under the hood, when you issue the halt command, the operating system goes through a series of steps to ensure a clean shutdown. It stops all running processes, unmounts filesystems, and sends signals to devices and services to shut down gracefully. Once everything is properly shut down, it halts the CPU and powers off the system hardware.

If you check the man page (with man halt) you’ll see that it agrees with the above statement and is a tool for managing your power state.

halt, poweroff, reboot – Halt, power-off or reboot the machine

While there’s more to the command, we’ll just cover the basics. So, press CTRL + ALT + T and open your default terminal emulator.

Or not… You only want to run the halt command when you need the command. It will shut everything down and that’s not something you necessarily want to do while reading this article.

The syntax is quite simple:

This will halt all the processes and leave the computer running. To completely turn it off, you’ll need to use the power button.

You can also try this command:

Now the -p is handy. After halting the computer, it will initiate a shutdown.

Then, you might find this a bit handier…

If it’s not obvious, the --reboot flag will reboot the computer. This means you needn’t use the power button for anything. It should just halt the system and then initiate a reboot sequence.

Closure:

That’s all there is today. I told you, it’s a short article. We just covered the halt command and nothing more. This isn’t complicated enough for a full-length article but is still a command that deserves to be mentioned. So, it has been mentioned. The good news is that there might be a future article that refers to this article, so my time might not be wasted.

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.