In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to use the uname command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
When you are in console mode, you cannot get information about the operating system through the right mouse button. At this point, under Linux, you can use the uname command to help you get the job done. Uname is the abbreviation of unix name. Just type uname when you actually use it in the console.
When you type uname with no parameters, it only displays the name of your operating system.
# uname Linux
Maybe it's not enough to meet your needs. So you need to add some parameters to make uname display the information you need.
The following is a list of uname parameters.
1. Kernel name
You can use the-s parameter to display the kernel name. (note: you can run this command on other Unix-like systems, for example, mac will display Darwin)
# uname-s Linux
The output information will be the same as when uname has no parameters.
two。 Kernel distribution
If you want to know which kernel distribution you are using (a different kernel package), you can use the-r parameter
# uname-r 2.6.18-371.1.2.el5
3. Kernel version
In addition to some kernel information, you can also get more detailed kernel version information with the-v parameter uname.
# uname-v # 1 SMP Tue Oct 22 12:57:43 EDT 2013
4. Node name
The parameter-n will provide you with the hostname of the node. For example, if your hostname is "dev-machine", the-n parameter prints the hostname.
# uname-n dev-machine
For RedHat and CentOS users, you can also view it through the / etc/redhat_release file:
# cat / etc/redhat_release CentOS release 5.10 (Final)
If it is not a RedHat-based distribution, you can check the / etc/issue file. Similar to the following:
# cat / etc/issue Linux Mint Olivia\ n\ l:
5. Hardware name
If you want to know what kind of machine you are using, you can try the-m parameter. It will tell you about the hardware.
# uname-Mi686
I686 indicates that you are using a 32-bit operating system, and if it is X86x64, it means you are using a 64-bit system.
6. Hardware platform
Similar to the hardware name, the-I parameter shows your hardware platform (hardware name i686 belongs to the hardware platform i386 series).
# uname-i386
Similarly, i386 means that this is a 32-bit system running, and if the output is X86x64, then you are running a 64-bit system.
7. Processor Typ
You can use the-p parameter to see the processor type. If the uname is not recognized, it displays' unknown' as output.
# uname-pi686
8. Operating system
Uname can also reveal the operating system you are running, and you can do this with the-o parameter.
# uname-o GNU/Linux
9. All the information.
There is one parameter that displays all the information! This is the-a parameter, which displays all the information. If-I and-p are output to unknown, they are omitted by default.
# uname-a Linux dev-machine 2.6.18-371.1.2.el5 # 1 SMP Tue Oct 22 12:57:43 EDT 2013 i686 i686 i386 GNU/Linux Thank you for reading! This is the end of the article on "how to use 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, you can 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.