The following procedures describe different commands available for displaying information that identifies users on your system and the system you are using.
When you have more than one concurrent login, it is often easy to lose track of the login names or, in particular, the login name being used at the time.
To determine which login name is being used, at the prompt, enter:
whoami
The system displays information similar to the following:
denise
In this example, the login name is denise.
See the whoami command in the AIX Version 4.3 Commands Reference for the exact syntax.
A variation of the who command, the who am i command, displays the login name, terminal name, and time of the login.
who am i
The system displays information similar to the following:
denise pts/0 Jun 21 07:53
In this example, the login name is denise, the name of the terminal is pts/0, and this user logged in at 7:53 a.m. (AIX uses a 24-hour clock) on June 21.
See the who command in the AIX Version 4.3 Commands Reference for the exact syntax.
Another variation of the who command, the logname command, displays the same information as the who command.
logname
The system displays information similar to the following:
denise
In this example, the login name is denise.
See the logname command in the AIX Version 4.3 Commands Reference for the exact syntax.
The uname command displays the name of the operating system that you are using.
For example, at the prompt, enter:
uname
The system displays information similar to the following:
AIX
In this example, the operating system name is AIX.
See the uname command in the AIX Version 4.3 Commands Reference for the exact syntax.
The uname command used with the -n flag displays the name of your system if you are on a network. Your system name identifies your system to the network, it is not the same as your login ID.
For example, at the prompt, enter:
uname -n
The system displays information similar to the following:
barnard
In this example, the system name is barnard.
See the uname command in the AIX Version 4.3 Commands Reference Book for more information and the exact syntax.
The who command displays information about all users currently on the local system. The following information is displayed: login name, workstation name, and date and time of login.
Note: This command only identifies users on the local node.
To display information about who is using the local system node, enter:
who
The system displays information similar to the following:
joe lft/0 Jun 8 08:34 denise pts/1 Jun 8 07:07
In this example, the user joe, on terminal lft/0, logged in at 8:34 a.m. on June 8.
See the who command in the AIX Version 4.3 Commands Reference for the exact syntax.
The id command displays the system identifications (ID) for a specified user. The system IDs are numbers that identify users and user groups to the system. The id command displays the following information, when applicable:
For example, at the prompt, enter:
id
The system displays information similar to the following:
uid=1544(sah) gid=300(build) euid=0(root) egid=9(printq) groups=0(system),10(audit)
In this example, the user has user name sah with an ID number of 1544; a primary group name of build with an ID number of 300; an effective user name of root with an ID number of 0; an effective group name of printq with an ID number of 9; and two supplementary group names of system and audit, with ID numbers 0 and 10, respectively.
For example, at the prompt, enter:
id denise
The system displays information similar to the following:
uid=2988(denise) gid=1(staff)
In this example, the user denise has an ID number of 2988 and only has a primary group name of staff with an ID number of 1.
See the id command in the AIX Version 4.3 Commands Reference for the exact syntax.
Commands and Processes Overview
User Environment and System Information
User Environment Customization