logname

display user name 

Command


SYNOPSIS

logname


DESCRIPTION

logname displays the login name of the person who issues the command.

Windows use the GetUserName() function to determine the user login name. On 8.1/2012R2/10/2016/2019/11/2022 the name of the account that was logged into the computer is displayed.


DIAGNOSTICS

Possible exit status values are:

0 

Successful completion.

1 

logname could not determine the login name.


PORTABILITY

POSIX.2. x/OPEN Portability Guide 4.0. UNIX System V. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


AVAILABILITY

PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Commands:
env, id

Miscellaneous:
envvar


PTC MKS Toolkit 10.4 Documentation Build 39.