diff --git a/sources/9 Linux Uname Command Examples To Get Operating System Details.md b/sources/9 Linux Uname Command Examples To Get Operating System Details.md deleted file mode 100644 index 258ec5b8df..0000000000 --- a/sources/9 Linux Uname Command Examples To Get Operating System Details.md +++ /dev/null @@ -1,107 +0,0 @@ - Luoxcat Translating - -9 Linux Uname Command Examples To Get Operating System Details -================================================================================ -![](http://linoxide.com/wp-content/uploads/2013/11/linux-uname-command.png) - -When you are in console mode, there is no ‘Right click > About’ to give you information about your operating system. In Linux, you can use command **uname** to help you about that. Uname is the short name for **unix name**. Just type **uname** in console. - -When you type uname without parameter, it will only show the name of your operating system. - - # uname - Linux - -It may not satisfy what you need. So you may need to use some parameters to make uname show the information you need. - -Here’s the list of uname parameters : - -### 1. Kernel name ### - -To reveal the kernel name, you can use **-s** parameter. - - # uname -s - Linux - -The output will be same with uname without parameter. - -### 2. Kernel release ### - -If you need to know what kernel release you’re using, just use **-r** parameter - - # uname -r - 2.6.18-371.1.2.el5 - -### 3. Kernel version ### - -Beside kernel information, uname can also fetch the kernel version. Use **-v** parameter for this purpose - - # uname -v - #1 SMP Tue Oct 22 12:57:43 EDT 2013 - -### 4. Nodename ### - -Parameter -n will give you the node hostname. For example, if your hostname is “dev-machine”, **-n** parameter will print dev-machine as the output of -n parameter - - # uname -n - dev-machine - -For RedHat and CentOS, you can also use **/etc/redhat_release** file : - - # cat /etc/redhat_release - CentOS release 5.10 (Final) - -For non-RedHat based distro, you may use **/etc/issue**. Here’s the example : - - # cat /etc/issue - Linux Mint Olivia \n \l - -### 5. Hardware name ### - -If you are wondering what kind of machine you’re using, you can try **-m** parameter. It will show you information about it. - - # uname -m - i686 - -i686 is indicates that your system is 32 bit operating system. While x86_64 means your system is a 64 bit system. - -### 6. Hardware platform ### - -Similar with hardware name, -i parameter will show you hardware platfrom. - - # uname -i - i386 - -i386 mean you are running a 32 bit system. If the output is x86_64 it’s mean that you are running 64 bis system. - -### 7. Processor type ### - -To see processor type, you can use **-p** parameter. If uname is not able to show you that information, it will show you ‘unknown’ in the output. - - # uname -p - i686 - -### 8. Operating system ### - -Uname can also used to reveal what operating system you are running. Use **-o** parameter to fulfill this purpose. - - # uname -o - GNU/Linux - -### 9. All information ### - -There is one parameter that can reveal all information. It’s **-a** parameter. It will show you all information **except omit -i and -p** if they are unknown. - - # 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 - -That’s the uname command in use. Please stay tuned to see more commands. - -Thank you. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/uname-command/ - -译者:[译者ID](https://github.com/译者ID) 校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出 diff --git a/translated/9 Linux Uname Command Examples To Get Operating System Details.md b/translated/9 Linux Uname Command Examples To Get Operating System Details.md new file mode 100644 index 0000000000..2e67844538 --- /dev/null +++ b/translated/9 Linux Uname Command Examples To Get Operating System Details.md @@ -0,0 +1,119 @@ +九个用Linux uname 命令获取操作系统详情的实例 + +================================================================================ + +![](http://linoxide.com/wp-content/uploads/2013/11/linux-uname-command.png) + +当你在控制台模式下,无法通过‘右击 > About’给予你关于操作系统的信息.在Linux下,你可以用**uname**命令,帮助你完成. Uname是**unix name**的缩写.让我们先在控制台键入**uname**. + +当你输入uname不带参数时,它仅仅只显示你的操作系统的名字. + + # uname + + Linux + +也许它不能满足你的需要.所以你需要用一些参数使uname显示所需信息. + +以下是uname参数的列表: + +### 1. 内核名称 ### + +你可以用**-s**参数,显示内核名称. + + # uname -s + + Linux + +输出信息会跟uname不带参数时输出的一样. + +### 2. 内核发行版 ### + +如果你想知道你正在使用那个内核版本,就可以用**-r**参数 + + # uname -r + + 2.6.18-371.1.2.el5 + +### 3. 内核版本 ### + +除一些内核信息外,用**-v**参数uname也能获取更详细的内核信息. + + # uname -v + + #1 SMP Tue Oct 22 12:57:43 EDT 2013 + +### 4. 节点名 ### + +参数 -n 会提供给你节点的主机名.举例来说,如果你的主机名是“dev-machine”,**-n**参数会打印用-n参数的输出. + + # uname -n + + dev-machine + +对于RedHat和CentOS用户来说,你也可以通过**/etc/redhat_release**文件: + + # cat /etc/redhat_release + + CentOS release 5.10 (Final) + +如果不是基于RedHat的发行版,你可以用**/et/issue/**文件.类似如下: + + # cat /etc/issue + + Linux Mint Olivia \n \l: + +### 5.硬件名称 ### + +如果你在疑惑用的是那类机器,你可以尝试**-m**参数.它将告诉你关于硬件的信息. + + # uname -m + + i686 + +i686表明了你用的是32位的操作系统.如果是X86_64则表明你用的是64位的系统. + +### 6. 硬件平台 ### + +类似与硬件名称, -i参数会显示你的硬件平台. + + # uname -i + + i386 + +i386意味这是正在运行一个32位的系统.如果输出的是X86_64则说明你正在运行一个64位的系统. + +### 7. 处理器类型 ### + +你可以用**-p**参数查看处理器类型.如果uname无法识别,它会显示 ‘unknown’ 的输出. + + # uname -p + + i686 + +### 8. 操作系统 ### + +Uname也可以透露你在运行的操作系统.用**-o**参数可以实现这个目的. + + # uname -o + + GNU/Linux + +### 9. 所有信息 ### + +有一个参数可以展示所有的信息!.这就是**-a**参数.它会显示所有信息,如果**-i和-p**输出为unknown则默认会被省略. + + # 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 + +以上就是关于uname命令的使用.请敬请期待更多的命令! + +谢谢! + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/uname-command/ + +译者:[Luoxcat](https://github.com/Luoxcat) 校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出