Linux uname command summary with examples tutorial factorpad. Kernel name, network node hostname, kernel release date, kernel version, machine hardware name, hardware platform, operating system. Sep 23, 20 uname can provide you a lot of information about your linux system. The output will be in the same order if the options are transposed, i. Learn uname command in linux with examples linoxide. This document covers the gnu linux version of uname. I typed the command uname a into my colleges server and got this. Simply to check which operating system you are currently using you can just use. Know your linux system information using uname command. Despite the popularity of window managers that offer graphical user interfaces, the best way to search for files in linux requires a shell. Jan 07, 2018 how do i check os version in linux command line.
For example, the following command creates an image of devsda partition. When called without any arguments, hostname displays the name. For example, the following will display the kernel name and version. Know the name of your kernel simplest use of any command is when it is used without any option. How to check os version in linux command line nixcraft. In this tutorial, we will discuss the basics of this tool using some easy to understand examples. You can use it to find out the hostname of the system youre on, the hardware architectures supported by the currently used kernel and the exact release of your system. The df command displays the file system disk space usage in output.
How to use the uname command, by the linux information project. Registered users last seen online, 3 days ago report user. So the output below shows that its the linux kernel that is used by this system. If the info and uname programs are properly installed at your site, the command. Uname command is used to display basic information about operating system and hardware. Apart from the hostname command, you can also use the uname n command to display the host name of your system. Linux uname command examples get kernel version, release. This runs the uname r command, which returns the current kernel version. With uname a its apparent that the only open calls go to system libraries, so technically there is no file on the filesystem that the uname opens for reading. It prints all the system information in the following order. Prints all information, omitting p and i if the information is unknown. The uname command writes to standard output the name of the operating system that you are using.
Operating system uname o prints the name of the operation system, for example gnulinux or msys. This document covers the gnu linux version of hostname. Kernel name, network node hostname, kernel release date, kernel version, machine hardware name, hardware platform, operating system syntax. As you already know, the name of the kernel is linux. The xx positions indicate the system and is always 00. If the info and uname programs are properly installed at your site, the command info coreutils aquname invocationaq. Understanding uname command in linux verify distribution by sahil suri january 9, 2018 the uname command is one of the first commands that a system administrator learns to use and ends up being one of the most frequently used commands throughout a system administrators career. This prints the kernel release date, version, processor type, etc. Our sixtysecond word, or command to memorize is uname from our category system. To get all above details you can use the uname command. Understanding uname command in linux verify distribution arkit. The uname tool is most commonly used to determine the processor architecture, the system hostname and the version of the kernel running on the system the.
I should write a function to get some information about the system the most important information is the the architecture. You can also use the uname command with argument s to check your current operating system name. Its main purpose is to uniquely identify over a network. Linux uname command examples get kernel version, release, hostname, etc. Command substitution allows the output of a command to replace the command itself. As heemayl properly pointed out there exists sys call to retrieving the information stored in the. To verify the processor type, run the following command.
The program strace allows us to view the system calls an application may make. Ive called each option to show you the output on my system. Linux uname command help and examples computer hope. The help option displays brief documentation for uname, and the version option provides unames version number. The full documentation for uname is maintained as a texinfo manual. On unixlike operating systems, the uname command prints information about the current system. Use the a option to show all the system information. Linux dd command explained for beginners 8 examples df. The uname system call and command appeared for the first time in pwbunix. Dec 08, 2019 uname command in linux will be covered in this tutorial. Usually, the uname command is used with the a option to print all available information. I found the function uname which can be used including sysutsname. Uname command in linux will be covered in this tutorial.
Linux you dont have to remember all the command line options. If uname is executed without option, it prints the kernel name that is the same output as uname s does. The find command, with its myriad options and switches, offers the most powerful and precise features to surface what youre looking for. How to use the uname command, by the linux information. The uname command is used to print system information like kernel version, kernel release etc. The machine id number contains 12 characters in the following digit format. Uname command displays important information about the system such as kernel name, host name, kernel release number, processor type, etc. But before we do that, its worth mentioning that all examples in the article have been tested on an ubuntu 14. Linux uname command examples get kernel version, release, hostname, etc sometimes it is required to quickly determine details like kernel name, version, hostname, etc of the linux box you are using. For example, to find out what version of the linux kernel is running on. Using the command uname a prints most of the information about the system. When the uname command is run without any option then it prints just the kernel name. The uname tool is most commonly used to determine the processor architecture, the system hostname and the version of the kernel running on the system the syntax of the. Even though you can find all these details in respective files present under the proc filesystem, it is easier to use uname utility to get these information quickly.
To verify the machine type, run the following command. Linux uname command tutorial for beginners 8 examples. Videos can also be accessed from the youtube playlist. Without any flags, the uname command will display the operating system that your are using. The uname command reports basic information about a computers.
On unixlike operating systems, the hostname command shows or sets the system hostname. Before we move to tutorial part of uname command, just remember the syntax of this command. The uname command reports basic information about a computers software and hardware its syntax is uname options when used without any options, uname reports the name, but not the version number, of the kernel i. I n this article we are going to discuss on uname linux commands with examples.
How to check linux kernel version in command line 4 easy. You can also use uname s, which also displays the kernel name. For example, the following will display the kernel name and version number inclusive of the release level. The command uname displays the information about the system. Linux shell 24 system information uname there are many times a user may need to find system information about the system hardware and operating system os. Rather it makes system calls using the c libraries. Mar 25, 2020 despite the popularity of window managers that offer graphical user interfaces, the best way to search for files in linux requires a shell. Well, there exists a builtin command line utility dubbed uname that lets you do this. Basic linux commands for beginners linux maker pro. Jan 09, 2018 understanding uname command in linux verify distribution by sahil suri january 9, 2018 the uname command is one of the first commands that a system administrator learns to use and ends up being one of the most frequently used commands throughout a system administrators career. A hostname is a name which is given to a computer and it attached to the network. Understanding uname command in linux verify distribution.