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.

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:

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…

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.

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.

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

If you want to know the specific kernel version:

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

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

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:

You’ll get an output similar to this:

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.

Check System Information With uname

In today’s article, we’re going to show you how to check system information with uname. This is a pretty handy command to have in your toolbox, and it’s really simple to use.

Once again, I’ll probably not cover every option, but only show you the commands I think you’ll find most useful. This should be both quick and easy enough for anyone to understand. Even a rank beginner should be able to follow along.

If you’ve ever asked a question on a forum, you may have been asked to show the output of the ‘uname -a‘ command. That’s a fine generic command to run, but you don’t have to output all that information. This could come in handy when you’re scripting and only need some of the information.

We’ll be using the uname command, as you might have guessed. According to the man page, the command defines itself as:

uname – print system information

That’s a pretty accurate definition and, sure enough, matches the headline and the introductory paragraph. Like I said, we’ll be collecting system information with uname. There’s not much more to it, so let’s just jump into the article.

Check System Information with uname:

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.

In it’s basic usage, the uname command can be run without any modifiers at all. To do so, simply type the following to get the system’s name:

The output of that will almost certainly just say ‘Linux’. Handy! 

Ah, but the uname command can do so much more. Want to know if you’re using 32 or 64 bit, the architecture? Easy enough, just use:

Would you like to use uname to check your kernel version? Try this command:

If you want to know your kernel release, that is the specific release you’re using at the moment, you need the -r flag. Try this:

Want to know the name of the network? Amazingly enough, that would require you using the -n flag. So it looks like:

Finally, as I mentioned in the intro, there’s the granddaddy of uname commands, which will output all the information you really need. Sure enough,  it’s accomplished with the -a flag:

As you can see, the flags mostly make sense for this command. Because of this, they should be easy to remember when you need to recall system information with the uname command. To see the complete manual, use the man uname command.

Closure:

Well, that’s yet another article. I hope you liked reading it as much as I enjoy typing these silly things out. It’s probably time to do a meta article soon – as I’m really itching to do so. There have been some pretty good changes. So, that’ll be a fun article to write and I may do so soon.

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.

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