跳过导航链接 | |
退出打印视图 | |
手册页第 1 部分:用户命令 Oracle Solaris 11.1 Information Library (简体中文) |
- return user's login name
/usr/bin/logname
logname writes the user's login name to standard output. The login name is the string that is returned by the getlogin(3C) function. If getlogin() does not return successfully, the name corresponding to the real user ID of the calling process is used instead.
See environ(5) for descriptions of the following environment variables that affect the execution of logname: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH.
The following error values are returned:
Successful completion.
An error occurred.
Environment for user at login time
User and accounting information
See attributes(5) for descriptions of the following attributes:
|
env(1), login(1), getlogin(3C), utmpx(4), attributes(5), environ(5), standards(5)