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