uname

display system name information 

Command, KornShell Built-in


SYNOPSIS

uname [-amnrsv]


DESCRIPTION

The uname command lets shell scripts and other programs determine configuration information about the machine upon which the KornShell is running.

You can use the major and minor version numbers, returned by the -r and -v options to determine precisely which version of Windows is running on the machine:

                      Major   Minor
Windows Server 2003     5       02
Windows Server 2003 R2  5       02
Windows Vista           6       00
Windows Server 2008     6       00
Windows 7               6       01
Windows Server 2008 R2  6       01
Windows 8               6       02
Windows Server 2012     6       02
Windows 8.1             6       03
Windows Server 2012 R2  6       03
Windows 10             10       00
Windows Server 2016    10       00
Windows Server 2019    10       00
Windows 11             10       00
Windows Server 2022    10       00

Options

-a 

displays all fields (equivalent to -mnrsv).

-m 

displays the CPU or machine type. Possible values include:

386      Intel 386
486      Intel 486
586      Intel Pentium
2200     Intel IA64
8664     x64 (AMD64/EM64T)
-n 

displays the node name of this particular machine. The node name usually differentiates machines running at one location.

-r 

displays the release (major version) number of the operating system.

-s 

displays the name of the operating system. This is the default output, when no options are given. The operating system name is Windows_NT for all supported platforms.

-v 

displays the version (minor version) number of the operating system.

uname displays the selected information in the following order:

<system name>   <nodename>   <release>     <version>     <machine>

EXAMPLES

This shell command changes the prompt to identify the computer location.

export PS1="`uname -n`$ "

DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

Failure due to an inability to find the desired information.

2 

Failure due to an invalid command line option.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. UNIX System V. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


NOTE

uname is provided as both an external utility and as a built-in MKS KornShell utility.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.4 Documentation Build 39.