UNIX Primer

Home | Primer Home


Getting System Information

There are many commands available to us which allow us to learn more about the system on which we are currently working.

For instance, if we want to know the name of the server we are on, we can use the 'hostname' command. Supposing we don't know who is logged in to a particular computer, we can go to that computer and use the 'whoami' command to reveal that person's username. If we want a list of everyone who is logged on to the computer we are working on, we can use the 'who' command. Alternatively, we can type 'w' to see not just who is on, but also what they are doing. To get more information about a particular user, we can use the 'finger' command.

For practice, log on to eniac-l and type 'whoami' to see your username. Then, enter 'hostname' and you will see that although you logged onto eniac, you are actually on another server. Type 'who' to see who is also logged in to this server, then pick a user and 'finger' him to see more information. Type 'w' and find out what this person is currently doing.

Related Commands:

NamePurpose
hostname Displays the hostname of the server on which you are currently working.
Syntax
hostname

NamePurpose
whoami Displays the username of the person who types the command.
Syntax
whoami
Notes

NamePurpose
who Displays various information about the people currently logged on to the server.
Syntax
who

NamePurpose
finger Displays information about local and remote users.
Syntax
finger

NameMeaningPurpose
w What? Displays various information about the people currently logged on to the server, including what commands they are currently running.
Syntax
w


Designed by D. Kaminsky
Edited by Diana Palsetia
© University of Pennsylvania, 2008