Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the use of the uname command in Linux

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail what is the use of the uname command in Linux. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Linux common command uname command is used to display system information, uname can display computer and operating system related information.

Uname prints system information.

Summary uname [OPTION]... The main purpose is to print information about machines and operating systems.

When there is no option, the-s option is enabled by default.

If multiple options or the-an option are given, the output is sorted by the following fields: kernel name, host name, kernel release, kernel version, machine name, processor hardware platform operating system.

The option-a,-- all prints all the information in order, omitting if the information for-p and-I is unknown. -s,-- kernel-name prints the kernel name. -n,-- nodename prints the host name of the network node. -r,-- kernel-release prints kernel release. -v,-- kernel-version prints the kernel version. -m,-- machine prints the machine name. -p,-- processor print processor name. -I,-- hardware-platform print hardware platform name. -o,-- operating-system prints the operating system name. -- help displays help information and exits. -- version displays version information and exits. A return value of 0 indicates success, while a non-zero value indicates failure.

Example # using the uname command alone is equivalent to uname-s [root@localhost ~] # uname Linux # View all information [root@localhost ~] # uname-a Linux localhost 2.6.18-348.6.1.el5 # 1 SMP Tue May 21 15:34:22 EDT 2013 i686 i686 i386 GNU/Linux # list information [root@localhost ~] # uname-mi686 [root@localhost ~] # uname-n localhost [root@localhost ~] # uname-r 2.6.18-4-686 [root@localhost ~] # uname-s Linux [root@localhost ~] # uname-v # SMP Tue May 21 15:34:22 EDT 2013 [root@localhost ~] # uname-pi686 [root@localhost ~] # uname-i386 [root@localhost ~] # uname-o GNU/Linux Note this command is in the GNU coreutils package For help, please see man-s 1 uname,info coreutils' uname invocation'.

This is the end of this article on "what is the use of uname commands in Linux?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report