手册页部分 1: 用户命令

退出打印视图

更新时间: 2014 年 7 月
 
 

whoami(1B)

名称

whoami - display the effective current username

用法概要

/usr/ucb/whoami 

描述

whoami displays the login name corresponding to the current effective user ID. If you have used su to temporarily adopt another user, whoami will report the login name associated with that user ID. whoami gets its information from the geteuid and getpwuid library routines (see getuid and getpwnam (3C), respectively).

文件

/etc/passwd

username data base

属性

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
compatibility/ucb

另请参见

su(1M), who(1), getuid (2), getpwnam (3C), attributes (5)

附注

This command is obsolete and will be removed in a future release of Solaris. See who(1) for an alternate implementation of this command.