arch(1) User Commands arch(1)NAME
arch - display the architecture of the current host
SYNOPSIS
arch [-k | archname]
DESCRIPTION
The arch utility displays the application architecture of the current host system. Due to extensive historical use of this command without
any options, all SunOS 5.x SPARC based systems will return "sun4" as their application architecture. Use of this command is discouraged.
See NOTES section below.
Systems can be broadly classified by their architectures, which define what executables will run on which machines. A distinction can be
made between kernel architecture and application architecture (or, commonly, just "architecture"). Machines that run different kernels due
to underlying hardware differences may be able to run the same application programs.
OPTIONS -k Displays the kernel architecture, such as sun4u. This defines which specific SunOS kernel will run on the machine, and has implica-
tions only for programs that depend on the kernel explicitly (for example, ps(1)).
OPERANDS
The following operand is supported:
archname Use archname to determine whether the application binaries for this application architecture can run on the current host sys-
tem. The archname must be a valid application architecture, such as sun4, i86pc, and so forth.
If application binaries for archname can run on the current host system, TRUE (0) is returned. Otherwise, FALSE (1) is
returned.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO mach(1), ps(1), uname(1), attributes(5)NOTES
This command is provided for compatibility with previous releases and its use is discouraged. Instead, the uname command is recommended.
See uname(1) for usage information.
SunOS 5.11 21 Oct 2002 arch(1)
Check Out this Related Man Page
uname(1) User Commands uname(1)NAME
uname - print name of current system
SYNOPSIS
uname [-aimnprsvX]
uname [-S system_name]
DESCRIPTION
The uname utility prints information about the current system on the standard output. When options are specified, symbols representing one
or more system characteristics will be written to the standard output. If no options are specified, uname prints the current operating sys-
tem's name. The options print selected information returned by uname(2), sysinfo(2), or both.
OPTIONS
The following options are supported:
-a Prints basic information currently available from the system.
-i Prints the name of the platform.
-m Prints the machine hardware name (class). Use of this option is discouraged. Use uname -p instead. See NOTES section
below.
-n Prints the nodename (the nodename is the name by which the system is known to a communications network).
-p Prints the current host's ISA or processor type.
-r Prints the operating system release level.
-s Prints the name of the operating system. This is the default.
-S system_name The nodename may be changed by specifying a system name argument. The system name argument is restricted to SYS_NMLN
characters. SYS_NMLN is an implementation specific value defined in <sys/utsname.h>. Only the super-user is allowed this
capability. This change does not persist across reboots of the system. Use sys-unconfig(1M) to change a host's name per-
manently.
-v Prints the operating system version.
-X Prints expanded system information, one information element per line, as expected by SCO UNIX. The displayed information
includes:
o system name, node, release, version, machine, and number of CPUs.
o BusType, Serial, and Users (set to "unknown" in Solaris)
o OEM# and Origin# (set to 0 and 1, respectively)
EXAMPLES
Example 1 Printing the OS name and release level
The following command:
example% uname -sr
prints the operating system name and release level, separated by one SPACE character.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of uname: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
SYSV3 This variable is used to override the default behavior of uname. This is necessary to make it possible for some INTERACTIVE UNIX
Systems and SCO UNIX programs and scripts to work properly. Many scripts use uname to determine the SYSV3 type or the version of
the OS to ensure software is compatible with that OS. Setting SYSV3 to an empty string will make uname print the following
default values:
nodename nodename 3.2 2 i386
The individual elements that uname displays can also be modified by setting SYSV3 in the following format:
os,sysname,node,rel,ver,mach
os Operating system (IUS or SCO).
sysname System name.
node Nodename as displayed by the -n option.
rel Release level as displayed by the -r option.
ver Version number as displayed by the -v option.
mach Machine name as displayed by -m option.
Do not put spaces between the elements. If an element is omitted, the current system value will be used.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO arch(1), isalist(1), sys-unconfig(1M), sysinfo(2), uname(2), nodename(4), attributes(5), environ(5), standards(5)NOTES
Independent software vendors (ISVs) and others who need to determine detailed characteristics of the platform on which their software is
either being installed or executed should use the uname command.
To determine the operating system name and release level, use uname -sr. To determine only the operating system release level, use uname
-r. Notice that operating system release levels are not guaranteed to be in x.y format (such as 5.3, 5.4, 5.5, and so forth); future
releases could be in the x.y.z format (such as 5.3.1, 5.3.2, 5.4.1, and so forth).
In SunOS 4.x releases, the arch(1) command was often used to obtain information similar to that obtained by using the uname command. The
arch(1) command output "sun4" was often incorrectly interpreted to signify a SunOS SPARC system. If hardware platform information is
desired, use uname -sp.
The arch -k and uname -m commands return equivalent values; however, the use of either of these commands by third party programs is dis-
couraged, as is the use of the arch command in general. To determine the machine's Instruction Set Architecture (ISA or processor type),
use uname with the -p option.
SunOS 5.11 17 Sep 2003 uname(1)