This section describes following procedures 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 that you are using at the time.
To determine which login name is being used, at the prompt, type:
whoami
The system displays information similar to the following:
denise
In this example, the login name being used is denise.
See the whoami command in the AIX 5L Version 5.2 Commands Reference for the complete syntax.
A variation of the who command, the who am i command, allows you to display the login name, terminal name, and time of the login.At the prompt, type:
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. on June 21.
See the who command in the AIX 5L Version 5.2 Commands Reference for the complete syntax.
Another variation of the who command, the logname command displays the same information as the who command.
At the prompt, type:
logname
The system displays information similar to the following:
denise
In this example, the login name is denise.
To display the name of the operating system, use the uname command .
For example, at the prompt, type:
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 5L Version 5.2 Commands Reference for the complete syntax.
To display the name of your system if you are on a network, use the uname command with the -n flag. Your system name identifies your system to the network; it is not the same as your login ID.
For example, at the prompt, type:
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 5L Version 5.2 Commands Reference Book for the complete syntax.
To display information about all users currently on the local system, use the who command . The following information is displayed: login name, system 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, type:
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 5L Version 5.2 Commands Reference for the exact syntax.
To displays the system identifications (IDs) for a specified user, use the id command . 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, type:
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, type:
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 5L Version 5.2 Commands Reference for the complete syntax.