Main index

Introducing UNIX and Linux


Getting started

Overview
Using UNIX
      Usernames
      Logging in
Logging out
Commands
      Typing in commands
      Commands and options
Communication with other users
      Email
      Other communication facilities
Files
      The editor Vi
            Vi commands (command mode)
            Vi commands (colon mode)
      Other editors
Input and output
      Scripts
      Here-documents
      Pipes
      Making copies of input and output
      Pagers
Emergencies
Getting help
Summary
Exercises

Answer to chapter 4 question 1

Whenever you need to find out information about a command, you should use man. With option -k followed by a keyword, man will display commands related to that keyword. In this case, a suitable keyword would be login, and the dialogue would look like:

man -k login
   ...
logname (1) - print user's login name
   ...

The correct answer is therefore logname. Try it:

logname
chris


Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck