1*40396b53Swiz.\" $NetBSD: logname.1,v 1.14 2017/07/04 07:02:44 wiz Exp $ 227e6ad95Sjtc.\" 327e6ad95Sjtc.\" Copyright (c) 1991, 1993 427e6ad95Sjtc.\" The Regents of the University of California. All rights reserved. 561f28255Scgd.\" 661f28255Scgd.\" This code is derived from software contributed to Berkeley by 761f28255Scgd.\" the Institute of Electrical and Electronics Engineers, Inc. 861f28255Scgd.\" 961f28255Scgd.\" Redistribution and use in source and binary forms, with or without 1061f28255Scgd.\" modification, are permitted provided that the following conditions 1161f28255Scgd.\" are met: 1261f28255Scgd.\" 1. Redistributions of source code must retain the above copyright 1361f28255Scgd.\" notice, this list of conditions and the following disclaimer. 1461f28255Scgd.\" 2. Redistributions in binary form must reproduce the above copyright 1561f28255Scgd.\" notice, this list of conditions and the following disclaimer in the 1661f28255Scgd.\" documentation and/or other materials provided with the distribution. 1789aaa1bbSagc.\" 3. Neither the name of the University nor the names of its contributors 1861f28255Scgd.\" may be used to endorse or promote products derived from this software 1961f28255Scgd.\" without specific prior written permission. 2061f28255Scgd.\" 2161f28255Scgd.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2261f28255Scgd.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2361f28255Scgd.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2461f28255Scgd.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2561f28255Scgd.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2661f28255Scgd.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2761f28255Scgd.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2861f28255Scgd.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2961f28255Scgd.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3061f28255Scgd.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3161f28255Scgd.\" SUCH DAMAGE. 3261f28255Scgd.\" 3327e6ad95Sjtc.\" @(#)logname.1 8.1 (Berkeley) 6/9/93 3461f28255Scgd.\" 35c917dfb5Scgd.Dd June 9, 1993 3661f28255Scgd.Dt LOGNAME 1 379e44e9b5Sgarbled.Os 3861f28255Scgd.Sh NAME 3961f28255Scgd.Nm logname 4061f28255Scgd.Nd display user's login name 4161f28255Scgd.Sh SYNOPSIS 42f715ca9aSlukem.Nm 4361f28255Scgd.Sh DESCRIPTION 4461f28255ScgdThe 45f715ca9aSlukem.Nm 4661f28255Scgdutility writes the user's login name to standard output followed by 4761f28255Scgda newline. 4861f28255Scgd.Pp 4961f28255ScgdThe 50f715ca9aSlukem.Nm 5161f28255Scgdutility explicitly ignores the 5261f28255Scgd.Ev LOGNAME 5361f28255Scgdand 5461f28255Scgd.Ev USER 5561f28255Scgdenvironment variables 5661f28255Scgdbecause the environment cannot be trusted. 57*40396b53Swiz.Sh EXIT STATUS 58*40396b53Swiz.Ex -std logname 5961f28255Scgd.Sh SEE ALSO 6061f28255Scgd.Xr who 1 , 6161f28255Scgd.Xr whoami 1 , 62e6f7684fSmikel.Xr getlogin 2 6361f28255Scgd.Sh STANDARDS 6461f28255ScgdThe 65f715ca9aSlukem.Nm 66522cbae7Sjtcutility conforms to 67522cbae7Sjtc.St -p1003.2-92 . 6827e6ad95Sjtc.Sh HISTORY 6927e6ad95SjtcThe 7027e6ad95Sjtc.Nm 71e6f7684fSmikelcommand appeared in 7227e6ad95Sjtc.Bx 4.4 . 73