General

Get System Information With The ‘uname’ Command In Linux

Today we’ll be learning about a basic Linux command that’s known as ‘uname’ and it will be available in every Linux you are likely to touch. The uname command is one way to show some important system information in the Linux terminal.

You won’t even need to install anything. That’ll keep things easy and short!

The uname command stands for ‘Unix Name’ and is a part of ‘coreutils’, meaning it’s a default application included with Linux. If you’re using Linux, you almost certainly have the uname command available to you. I suppose someone might have stripped it out of an embedded system somewhere, but even that’s unlikely.

The uname command is used for displaying system information. It’s a bit limited in scope, but it still has useful information and the command is one you’ll see referenced often enough.

uname --v

As I said, it’s a core utility in Linux. That means that uname is included with a bunch of other core utilities. If you want, you can easily check the man page with this command:

man uname

If you do that, you’ll see this:

uname – print system information

So, this command can and will show system information. That’d be what I told you it did in the first paragraph. I do my best to not steer you wrong and that’s exactly what we’ll do with this article.

So, let’s learn how to use the uname command in Linux:

Use The uname Command:

As mentioned above, you use the uname command in the terminal. That means you’ll need an open terminal. You can usually press CTRL + ALT + T to open your terminal. So, do that…

With your terminal open, you can just run uname in the terminal and it will tell you what sort of system you’re running. Try it…

uname

It’ll happily spit out that you’re using Linux – if you are indeed using Linux.

It’ll also happily tell you the kernel name with the -s flag.

uname -s

It should again spit out “Linux”, as that’s the kernel’s name.

If you want to know the kernel release information, use the -r flag.

uname -r

Do you want to know if it’s 32 or 64-bit (or if it’s ARM? Try this command:

uname -i

If you want to know the specific kernel version:

uname -v

Then, you can learn the machine’s name with the -m flag.

uname -m

You may just remember ‘mrs’ as that’s commonly  asked for in some support circles (and worth remembering):

uname -mrs

There’s more to it but all you need to know is how to get all the information at once. That’s all you need to know. That’s just using the -a flag, like so:

uname -a

You’ll get an output similar to this:

$ uname -a
Linux kgiii-msi 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Which is quite a bit of system information and makes the uname command a useful command in and of itself. It’s an easy-to-remember command and one available in any Linux you’re likely to touch.

Closure:

I was a bit surprised that I’d never covered the uname command before. It’s a pretty basic command and so I’m surprised that I overlooked it. No worries. I’ve covered it now. There’s more to it but you’ll be fine with just the flags I mentioned.

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.

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.

Recent Posts

Enable/Disable Your Network Interface

Today we'll cover one way to enable or disable your network interface in the Linux…

4 months ago

Check Your NIC Speed In The Terminal

Today's exercise is a nice and simple exercise where we check your NIC speed in…

4 months ago

Easily Monitor Your Wireless Connection

Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…

4 months ago

Count The Files In A Directory

I think I've covered this before with the ls command but this time we'll count…

4 months ago

hardinfo Has Been Rebooted As hardinfo2

If you've used hardinfo in the past, it may interest you to know that hardinfo…

4 months ago

Count The Number Of Running Processes Per User

This won't be as complicated as it seems because we're just going to cover how…

4 months ago