2019-04-21 11:50:48 +08:00

58 lines
2.0 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<h1 id="uname">uname</h1>
<p>显示Linux系统信息</p>
<h2 id="补充说明">补充说明</h2>
<p><strong>uname命令</strong> 用于打印当前系统相关信息(内核版本号、硬件架构、主机名称和操作系统类型等)。</p>
<h3 id="语法">语法</h3>
<pre><code class="language-bash">uname(选项)</code></pre>
<h3 id="选项">选项</h3>
<pre><code class="language-bash">-a或--all显示全部的信息
-m或--machine显示电脑类型
-n或-nodename显示在网络上的主机名称
-r或--release显示操作系统的发行编号
-s或--sysname显示操作系统名称
-v显示操作系统的版本
-p或--processor输出处理器类型或&quot;unknown&quot;
-i或--hardware-platform输出硬件平台或&quot;unknown&quot;
-o或--operating-system输出操作系统名称
--help显示帮助
--version显示版本信息。</code></pre>
<h3 id="实例">实例</h3>
<p>使用uname命令查看全部信息</p>
<pre><code class="language-bash">[root@localhost ~]# uname #单独使用uname命令时相当于uname -s
Linux
[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
[root@localhost ~]# uname -m
i686
[root@localhost ~]# uname -n
localhost
[root@localhost ~]# uname -r
2.6.18-4-686
[root@localhost ~]# uname -s
Linux
[root@localhost ~]# uname -v
#1 SMP Tue May 21 15:34:22 EDT 2013
[root@localhost ~]# uname -p
i686
[root@localhost ~]# uname -i
i386
[root@localhost ~]# uname -o
GNU/Linux
[root@localhost ~]# uname --version
uname (GNU coreutils) 5.97
Copyright (C) 2006 free Software Foundation, Inc.
这是自由软件。您可以按照 GNU GPL 协议 &lt;http://www.gnu.org/licenses/gpl.html&gt; 的条款再发布此软件的副本,但我们无法保证相关法律不对这一情形进行限制。
由 David MacKenzie 编写。</code></pre>
<!-- Linux命令行搜索引擎https://jaywcjlove.github.io/linux-command/ -->