1.\" Copyright (c) 1994 SigmaSoft, Th. Lockert 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by SigmaSoft, Th. Lockert. 15.\" 4. The name of the author may not be used to endorse or promote products 16.\" derived from this software without specific prior written permission 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 19.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 20.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 21.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 22.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 23.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28.\" 29.\" $OpenBSD: arch.1,v 1.4 1999/08/19 22:17:38 niklas Exp $ 30.\" 31.Dd June 22, 1996 32.Dt ARCH 1 33.Os 34.Sh NAME 35.Nm arch , 36.Nm machine 37.Nd print architecture type 38.Sh SYNOPSIS 39.Nm arch 40.Op Fl ks 41.Nm machine 42.Op Fl a 43.Sh DESCRIPTION 44The 45.Nm 46and 47.Nm machine 48command displays the machine's architecture in slightly different ways. 49.Nm 50by default displays the application architecture, defined by both the 51operating system and the instruction set architecture, while 52.Nm machine 53displays the kernel architecture (without the operating system part). 54Note that both commands output the target architecture as opposed to 55.Xr uname 1 56which describes the host. This is useful for dynamic discovery 57of the target architecture in build or configuration scripts 58needing to work in cross-compilation environments. 59.Pp 60The following options are available to 61.Nm arch : 62.Bl -tag -width indent 63.It Fl k 64Display the kernel architecture instead of application 65architecture. 66.It Fl s 67Display the chosen architecture in a short form, i.e. without the 68operating system prefixed. 69.El 70.Pp 71The 72.Nm machine 73command accepts this option: 74.Bl -tag -width indent 75.It Fl a 76Display the application architecture instead of the kernel architecture. 77.El 78.Sh SEE ALSO 79.Xr uname 1 80.Sh HISTORY 81The 82.Nm 83command is 84.Ud . 85