[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Quick Beginnings

Entering Commands

In the command line interface, you must enter commands to tell the operating system which task you want to perform. When commands are entered, they are read by a command interpreter (also known as a shell) and then processed. You can use three different shells: Korn (also known as the POSIX shell), Bourne, and C.

The login shell refers to the shell that is loaded when you log in to the computer system. Initially, the Korn shell is set up as the login shell.

Although some commands can be entered by simply typing one word, other commands use flags and parameters. Each command has a syntax that designates the required and optional flags, files, and parameters.

To enter a command, type in the command name or program name at the prompt:

$ CommandName
$ ProgramName

Some general rules about commands are:

Common Problems When Entering Commands

When entering commands, you are likely to encounter one of the following problems: a misspelled command, an incomplete command, or a case-sensitive command.

Misspelled Command

When you enter a misspelled command, the shell may return an error message. For example, if you entered whiami instead of whoami , the system displays the following on your screen:

$ whiami
/bin/ksh: whiami: not found.
$

You might get an error message even if it appears that you typed the command correctly. Invisible control characters typed in by mistake usually cause this. Just retype the command when the prompt appears.

Incomplete Command

If an incomplete command is entered, the system waits for the command to be completed and may appear to be frozen (not doing anything). For example, the cat command is always used with a file name. If the command you had intended to enter was cat testfile , but instead you entered cat , the screen appears as follows:

$ cat
_

If you enter the file name now, the screen appears as in the following illustration. The file name is repeated (echoed), but the system is still not doing anything.

$ cat
testfile
testfile
_

To restore operation, press Ctrl-C. This causes the system prompt to return. Your screen appears as in the following illustration.

$ cat
testfile
testfile
^C$

Case-Sensitive Command

If you enter a command using the wrong case, the shell may display an error message. For example, if you entered Ls instead of ls the system displays the following on your screen:

$ Ls
/bin/ksh: Ls: not found.
$

[ Previous | Next | Contents | Glossary | Home | Search ]