Commit | Line | Data |
---|---|---|
b6c9e217 KB |
1 | .\" Copyright (c) 1991 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" the Institute of Electrical and Electronics Engineers, Inc. | |
6 | .\" | |
7 | .\" %sccs.include.redist.roff% | |
8 | .\" | |
bf1f46f6 | 9 | .\" @(#)logname.1 5.2 (Berkeley) %G% |
b6c9e217 KB |
10 | .\" |
11 | .Dd "" | |
12 | .Dt LOGNAME 1 | |
bf1f46f6 | 13 | .Os |
b6c9e217 KB |
14 | .Sh NAME |
15 | .Nm logname | |
16 | .Nd display user's login name | |
17 | .Sh SYNOPSIS | |
18 | .Nm logname | |
19 | .Sh DESCRIPTION | |
20 | The | |
21 | .Nm logname | |
22 | utility writes the user's login name to standard output followed by | |
23 | a newline. | |
24 | .Pp | |
25 | The | |
26 | .Nm logname | |
bf1f46f6 CL |
27 | utility explicitly ignores the |
28 | .Ev LOGNAME | |
29 | and | |
30 | .Ev USER | |
31 | environment variables | |
b6c9e217 KB |
32 | because the environment cannot be trusted. |
33 | .Pp | |
34 | The | |
35 | .Nm logname | |
36 | utility exits 0 on success, and >0 if an error occurs. | |
37 | .Sh SEE ALSO | |
38 | .Xr who 1 , | |
39 | .Xr whoami 1 , | |
40 | .Xr getlogin 3 | |
41 | .Sh STANDARDS | |
42 | The | |
43 | .Nm logname | |
44 | function is expected to conform to | |
45 | .St -p1003.2 . | |
46 | .Sh HISTORY | |
47 | The | |
48 | .Nm | |
49 | command is | |
50 | .Ud . |