Annotation of src/usr.bin/uname/uname.1, Revision 1.19
1.19 ! schwarze 1: .\" $OpenBSD: uname.1,v 1.18 2022/07/25 02:25:56 jsg Exp $
1.8 aaron 2: .\"
1.1 deraadt 3: .\" Copyright (c) 1990 The Regents of the University of California.
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.
1.10 millert 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 15: .\" may be used to endorse or promote products derived from this software
16: .\" without specific prior written permission.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: .\" SUCH DAMAGE.
29: .\"
30: .\" from: @(#)du.1 6.13 (Berkeley) 6/20/91
31: .\"
1.19 ! schwarze 32: .Dd $Mdocdate: July 25 2022 $
1.1 deraadt 33: .Dt UNAME 1
34: .Os
35: .Sh NAME
36: .Nm uname
1.4 aaron 37: .Nd print operating system name
1.1 deraadt 38: .Sh SYNOPSIS
39: .Nm uname
1.11 jmc 40: .Op Fl amnprsv
1.1 deraadt 41: .Sh DESCRIPTION
42: The
43: .Nm uname
1.19 ! schwarze 44: utility writes strings representing one or more system characteristics
1.1 deraadt 45: to the standard output.
1.19 ! schwarze 46: The formats and meanings of all these strings vary among operating systems.
1.1 deraadt 47: .Pp
1.6 aaron 48: The options are as follows:
1.9 aaron 49: .Bl -tag -width Ds
1.5 aaron 50: .It Fl a
1.1 deraadt 51: Behave as though all of the options
1.5 aaron 52: .Fl mnrsv
1.1 deraadt 53: were specified.
54: .It Fl m
1.19 ! schwarze 55: Print the name of the hardware type.
! 56: On
! 57: .Ox ,
! 58: this is the kernel architecture as returned by
! 59: .Xr machine 1 .
1.1 deraadt 60: .It Fl n
1.19 ! schwarze 61: Print the network name of this machine.
! 62: On
! 63: .Ox ,
! 64: the same name can be printed with
! 65: .Xr hostname 1 .
1.3 deraadt 66: .It Fl p
1.19 ! schwarze 67: Print the application architecture as returned by
! 68: .Xr arch 1
! 69: .Fl s .
1.11 jmc 70: .It Fl r
71: Print the operating system release.
1.19 ! schwarze 72: On
! 73: .Ox ,
! 74: the format is
! 75: .Sm off
! 76: .Ar digit . digit Bq \- Ar flavor .
! 77: .Sm on
! 78: .Pp
! 79: The meaning of the
! 80: .Pf \- Ar flavor
! 81: suffix is as follows:
! 82: .Bl -tag -width "no suffix"
! 83: .It \-beta
! 84: A development version preceding the
! 85: .Ar digit . Ns Ar digit
! 86: release.
! 87: .It no suffix
! 88: A public release,
! 89: or a development version very closely preceding that release.
! 90: .It \-stable
! 91: A branch based on the
! 92: .Ar digit . Ns Ar digit
! 93: release that only contains patches to fix very important bugs.
! 94: .It \-current
! 95: A development version coming after the
! 96: .Ar digit . Ns Ar digit
! 97: release.
! 98: Some time before the subsequent release, the second
! 99: .Ar digit
! 100: is incremented and the
! 101: .Pf \- Ar flavor
! 102: switched to \-beta.
! 103: .El
1.1 deraadt 104: .It Fl s
1.4 aaron 105: Print the operating system name.
1.19 ! schwarze 106: On
! 107: .Ox ,
! 108: this is always
! 109: .Dq Ox .
1.1 deraadt 110: .It Fl v
1.4 aaron 111: Print the operating system version.
1.19 ! schwarze 112: On
! 113: .Ox ,
! 114: the format is
! 115: .Ar SYSTEMNAME Ns # Ns Ar buildnumber
! 116: with the
! 117: .Ar SYSTEMNAME
! 118: mentioned in
! 119: .Xr config 8 .
1.1 deraadt 120: .El
121: .Pp
1.5 aaron 122: If no options are specified,
1.1 deraadt 123: .Nm uname
124: prints the operating system name as if the
125: .Fl s
126: option had been specified.
1.19 ! schwarze 127: .Pp
! 128: If
! 129: .Fl a
! 130: or more than one option is specified,
! 131: .Ox
! 132: prints the selected fields separated by single space characters
! 133: in the following order: operating system name, network name,
! 134: release, version, kernel architecture, application architecture.
1.16 jmc 135: .Sh EXIT STATUS
1.15 jmc 136: .Ex -std uname
1.1 deraadt 137: .Sh SEE ALSO
138: .Xr hostname 1 ,
139: .Xr machine 1 ,
140: .Xr uname 3
141: .Sh STANDARDS
142: The
1.12 jmc 143: .Nm
144: utility is compliant with the
1.14 jmc 145: .St -p1003.1-2008
1.12 jmc 146: specification.
147: .Pp
148: The flag
149: .Op Fl p
150: is an extension to that specification.
1.7 aaron 151: .Sh HISTORY
152: The
153: .Nm
1.18 jsg 154: command first appeared in PWB/UNIX 1.0
155: and was reimplemented for
1.7 aaron 156: .Bx 4.4 .