Uname
From DssWiki
{{DISPLAYTITLE:{{#if:|:|}}uname}}
In computer software, uname (stands for Unix Name) is a program in Unix operating systems that prints the name, version and other details about the running operating system. It is useful for building software from source, when certain parameters depend on the host operating system. The uname system call and command appeared for the first time in UNIX System III.
Some Unix variants, such as AT&T UNIX System V Release 3.0 include the related setname program, used to change the values that uname reports.
In GNU systems, uname is included in the "sh-utils" or "coreutils" packages. uname itself is not available as a standalone program.
The ver command found in Microsoft operating systems such as MS-DOS or Windows is similar to the uname command.
[edit] Examples
On a system running Darwin the output from running uname with the -a option might look like the text below:
Darwin hostname.local. 6.8 Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC Power Macintosh powerpc
The following table contains examples from various versions of uname on various platforms.
| Operating System</th> | -s Kernel or System Name</th>
| -o OS</th>
| -m Machine</th>
| -p Processor</th>
| -i Hardware Platform</th>
| -v Kernel Version</th>
| -r Kernel Release</th>
|
|---|---|---|---|---|---|---|---|
| Cray UNICOS 9.0.2.2</td> | sn5176</td> | illegal option</td> | CRAY Y-MP</td> | illegal option</td> | illegal option</td> | sin.0</td> | 9.0.2.2</td> |
| FreeBSD 6.1, Intel</td> | FreeBSD</td> | illegal option</td> | i386</td> | i386</td> | [filename of kernel conf file]</td> | FreeBSD 6.1-RELEASE-p15 #1: Sun Apr 15 18:04:51 EDT 2007</td> | 6.1-RELEASE-p15</td> |
| Linux (Red Hat), Pentium 4</td> | Linux</td> | GNU/Linux</td> | i686</td> | i686</td> | i386</td> | #1 Sat Jul 23 07:47 UTC 2005</td> | 2.4.21-297-default</td> |
| Linux (Red Hat, Fedora core 5), Pentium 4</td> | Linux</td> | GNU/Linux</td> | i686</td> | i686</td> | i386</td> | #1 SMP Tue Mar 28 03:55:15 EST 2006</td> | 2.6.16-1.2080_FC5smp</td> |
| Linux (Fedora Core 6), AMD Thurion64 mobile | Linux | GNU/Linux | i686 | athlon | i386 | #1 SMP Wed Jan 10 19:28:18 EST 2007 | 2.6.19-1.2895.fc6 |
| Linux (Gentoo), Celeron M</td> | Linux</td> | GNU/Linux</td> | i686</td> | Intel(R) Celeron(R) M processor 1.50GHz</td> | unknown</td> | #2 PREEMPT Sun May 21 04:37:05 PDT 2006</td> | 2.6.16-suspend2-r6</td> |
| Linux (Gentoo), 64bit, Dual Core Opteron | Linux | GNU/Linux | x86_64 | Dual Core AMD Opteron(tm) Processor 270 | AuthenticAMD | ||
| Cygwin (Windows XP), Pentium 4</td> | CYGWIN_NT-5.1</td> | Cygwin</td> | i686</td> | unknown</td> | unknown</td> | 2006-01-20 13:28</td> | 1.5.19(0.150/4/2)</td> |
| Cygwin (Windows 2000), AMD Athlon</td> | CYGWIN_NT-5.0</td> | Cygwin</td> | i686</td> | unknown</td> | unknown</td> | 2006-01-20 13:28</td> | 1.5.19(0.150/4/2)</td> |
| Solaris 9, Ultra 5</td> | SunOS</td> | </td> | sun4u</td> | sparc</td> | SUNW,Ultra-5_10</td> | </td> | </td> |
| AIX</td> | aix6</td> | </td> | 000931784C00</td> | powerpc</td> | </td> | 5</td> | 1</td> |
| Mac OS X</td> | Darwin</td> | illegal option</td> | Power Macintosh</td> | powerpc</td> | illegal option</td> | Darwin Kernel Version 6.8: Wed Sep 10 15:20:55 PDT 2003; root:xnu/xnu-344.49.obj~2/RELEASE_PPC</td> | 6.8</td> |
| Mac OS X (intel)</td> | Darwin</td> | illegal option</td> | i386</td> | i386</td> | illegal option</td> | Darwin Kernel Version 8.6.1: Tue Mar 7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386</td> | 6.8</td> |
[edit] See also
[edit] External links
|Linux|default}}|1|uname|url}} uname{{#if:{{Man/{{#if:Linux |Linux|default}}|1|uname|display_section}}|({{Man/{{#if:Linux |Linux|default}}|1|uname|display_section}})}}]{{#if:|: }}{{#if:{{#ifeq: |inline||{{Man/{{#if:Linux |Linux|default}}|1|uname|attrib}}}}| – {{#ifeq: |inline||{{Man/{{#if:Linux |Linux|default}}|1|uname|attrib}}}}}}
{{#if: |
Unix command line programs and builtins (more) | |||
| File and file system management: | cat | chattr | cd | chmod | chown | chgrp | cksum | cmp | cp | du | df | file | fsck | fuser | ln | ls | lsof | mkdir | mount | mv | pwd | rm | rmdir | split | touch | ||
| Process management: | at | chroot | crontab | exit | kill | killall | nice | pgrep | pidof | pkill | ps | sleep | time | top | wait | watch | ||
| User Management/Environment: | env | finger | id | mesg | passwd | su | sudo | uname | uptime | w | wall | who | whoami | write | ||
| Text processing: | awk | comm | cut | ed | ex | fmt | head | iconv | join | less | more | paste | pg | sed | sort | tac | tail | tr | uniq | wc | xargs | ||
| Shell programming: | basename | echo | expr | false | printf | test | true | unset | Printing: | lp |
| Communications: inetd | netstat | ping | rlogin | traceroute | Searching: find | grep | strings | Miscellaneous: banner | bc | cal | dd | man | size | yes | |
