xref: /original-bsd/usr.bin/logname/logname.1 (revision 2f46dd9e)
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.\"
9.\"	@(#)logname.1	5.3 (Berkeley) 03/23/93
10.\"
11.Dd ""
12.Dt LOGNAME 1
13.Os BSD 4.4
14.Sh NAME
15.Nm logname
16.Nd display user's login name
17.Sh SYNOPSIS
18.Nm logname
19.Sh DESCRIPTION
20The
21.Nm logname
22utility writes the user's login name to standard output followed by
23a newline.
24.Pp
25The
26.Nm logname
27utility explicitly ignores the
28.Ev LOGNAME
29and
30.Ev USER
31environment variables
32because the environment cannot be trusted.
33.Pp
34The
35.Nm logname
36utility 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
42The
43.Nm logname
44function is expected to conform to
45.St -p1003.2 .
46.Sh HISTORY
47The
48.Nm
49command appears in
50.Bx 4.4 .
51