[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

System User's Guide: Operating System and Devices


User and System Identification

The following procedures describe different commands available for displaying information that identifies users on your system and the system you are using.

Displaying Your Login Name (whoami and logname Commands)

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.

whoami Command

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 is denise.

See the whoami command in the AIX 5L Version 5.1 Commands Reference for the exact syntax.

who am i Command

A variation of the who command, the who am i command displays 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.1 Commands Reference for the exact syntax.

logname Command

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.

See the logname command in the AIX 5L Version 5.1 Commands Reference for the exact syntax.

Displaying the Operating System's Name (uname Command)

The uname command displays the name of the operating system that you are using.

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.1 Commands Reference for the exact syntax.

Displaying Your System's Name (uname Command)

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, 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.1 Commands Reference Book for more information and the exact syntax.

Displaying Who Is Logged In (who Command)

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, 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.1 Commands Reference for the exact syntax.

Displaying User IDs (id Command)

The id command displays the system identifications (IDs) 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, 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.1 Commands Reference for the exact syntax.

Related Information

Chapter 3, Commands and Processes

Chapter 9, File and System Security

Chapter 2, User Environment and System Information

Chapter 10, Customizing the User Environment


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]