|
The user interface for your server product has several different command modes. This publication focuses on just one command mode: user EXEC mode. For information about privileged EXEC mode, refer to the configuration guide or command reference guide for your server.
In addition to actions that can be carried out through commands, the user interface also allows an administrator to create menus so that users can perform operations without having to know anything about the underlying command-level user interface.
Specifically, this chapter contains the following sections:
The EXEC commands at the user level are generally used to connect to remote systems, temporarily change terminal settings, perform basic tests, and list system information. Refer to the configuration guide for your server for information about entering privileged EXEC mode.
You enter commands at the system prompt. The system prompt indicates the server's host name followed by an angle bracket (>). The default host name is "cs" for a communication or access server, and "router" for a router, unless it was changed using the setup command during initial configuration. (Refer to the getting started guide for your server for information about the setup command facility.) The following example shows a communication or access server prompt and a router prompt:
cs>
router>
You can also change the server's name using the hostname command as described in your server's configuration guide.
You can enter commands in uppercase, lowercase, or a mix of both. You can abbreviate commands and keywords to the number of characters that allow a unique abbreviation. For example, you can abbreviate the show command to sh. Press the Return key to execute a command.
To list the user EXEC commands, enter a question mark (?) at the user EXEC prompt.
The following example shows the commands available in user EXEC mode on a communication or access server:
cs-1> ?
Exec commands:
<1-99> Session number to resume
connect Open a terminal connection
disconnect Disconnect an existing telnet session
enable Turn on privileged commands
exit Exit from the EXEC
help Description of the interactive help system
lat Open a lat connection
lock Lock the terminal
login Log in as a particular user
logout Exit from the EXEC
name-connection Name an existing telnet connection
ping Send echo messages
resume Resume an active telnet connection
rlogin Open an rlogin connection
show Show running system information
systat Display information about terminal lines
telnet Open a telnet connection
terminal Set terminal line parameters
tn3270 Open a tn3270 connection
where List active telnet connections
xremote Enter XRemote mode
Your list might vary slightly from this example, depending on how your server is configured.
You can get a list of any command's keywords and arguments with the context-sensitive help. You can enter the following commands for online help:
The space or lack of a space before the question mark (?) is significant. To see a list of commands that begin with a particular character set, enter those characters followed immediately by the question mark. Do not include a space. This is called word help, because it completes a word for you.
To list keywords or arguments, enter a question mark after the command in place of a keyword or argument. Include a space before the question mark. This is called command syntax help, because it lists the keywords or arguments for the command, keywords, and arguments you have entered.
The following is some sample output from the help command:
cs-1>
help
Help may be requested at any point in a command by entering
a question mark '?'. If nothing matches, the help list will
be empty and you must backup until entering a '?' shows the
available options.
Two styles of help are provided:
1. Full help is available when you are ready to enter a
command argument (e.g. 'show ?') and describes each possible
argument.
2. Partial help is provided when an abbreviated argument is entered
and you want to know what arguments match the input
(e.g. 'show pr?'.)
The following is the list of keywords displayed with the resume command:
cs-1> resume ?
/debug Print parameter changes & messages
/echo Perform local echo
/line Enable telnet line mode
/nodebug Do not print parameter changes & messages
/noecho Disable local echo
/noline Disable telnet line mode
/nostream Disable stream processing
/set Set X3 connection options
/stream Enable stream processing
<1-20> The number of an active telnet connection
<cr>
WORD The name of an active telnet connection or Connection options
The user interface can help you check the accuracy of your syntax. If your syntax has an error, the error location is indicated by a caret (^) at the point in the command string where you entered an incorrect command, keyword, or argument, so you can easily find and correct any syntax errors.
In the following example, the rlogin command is entered incorrectly:
dunes> rlogin 131.108.32.208 my-host
^
Invalid input detected at '^' marker.
The caret symbol and help response indicate that an incorrect entry was made at "my-host." Enter the command again up to the point of the error indicator and put a question mark at the end of the string to bring up context-sensitive help.
The user interface can provide a history of the commands you have entered. You can complete the tasks described in the following sections:
To set the number of command lines the system will maintain as a history, enter the following command:
terminal history size number-of-linesnumber-of-lines | Specifies the number of command lines that the system will record in its history buffer. The range is 0-256 and the default is 10 lines. |
To recall commands from the history buffer, enter any of the following key sequences:
The command history feature is automatically enabled. You can disable it in configuration mode for all subsequent sessions or in user EXEC mode for the current session. For information about configuration mode commands, refer to the configuration guide or command reference guide for your server. To disable it in user mode, enter the following command:
no terminal history sizeEnhanced editing mode provides a set of editing key functions similar to those of the EMACS editor. Enhanced editing mode is enabled by default.
You can enter commands in uppercase, lowercase, or a mix of both. Only passwords are case-sensitive. You can abbreviate commands and keywords to the number of characters that allow a unique abbreviation. For example, you can abbreviate the show command to sh. After entering the command line at the system prompt, press the Return key to execute the command.
This section describes how to perform the following tasks:
Enhanced editing mode is enabled by default, but you can disable it and revert to the editing mode of previous software releases.
You can re-enable the enhanced editing mode in user EXEC mode. Enter the following command:
terminal editingThe following keystrokes move the cursor back and forth on the command line for editing.
Task | Keystrokes |
Move the cursor back one character. | Ctrl-B or the left arrow key1 |
Move the cursor forward one character. | Ctrl-F or the right arrow key1 |
Move the cursor to the start of the command line. | Ctrl-A |
Move the cursor to the end of the command line. | Ctrl-E |
Move the cursor back one word. | Esc-B |
Move the cursor forward one word. | Esc-F |
If you cannot remember a complete command name, you can use the Tab key and the system will complete the partial entry. Enter the first few letters of the command and press the Tab key. If your keyboard does not have a Tab key, press Ctrl-I instead.
In the following example, when "term" is entered and the Tab key is pressed, the system provides the complete command:
ganges> term<Tab>
ganges> terminal
If you enter a set of characters that could indicate more than one command, the system beeps. Enter a question mark (?) for a list of commands that begin with those characters.
For example, there are two commands in user mode that start with "log":
mayday> log?
login logout
mayday> log
The system has a buffer containing the last ten items you deleted. You can recall these items and paste them in the command line by entering the following commands:
Task | Keystrokes |
---|---|
Recall the most recent entry in the buffer. | Ctrl-Y |
Recall the next buffer entry. | Esc-Y |
If you press Esc-Y more than ten times, you will cycle back to the first buffer entry.
Use the following keystrokes to delete characters or mistakes on the command line:
Task | Keystrokes |
---|---|
Erase the character to the left of the cursor. | Delete or Backspace key |
Delete the character at the cursor. | Ctrl-D |
Delete all characters from the cursor to the end of the command line. | Ctrl-K |
Delete all characters from the cursor to the beginning of the command line. | Ctrl-U or Ctrl-X |
Delete the word to the left of the cursor. | Ctrl-W |
Delete from the cursor to the end of the word. | Esc-D |
When you use help to list commands, the list might be longer than your screen can display. In such cases, a ---more---
prompt appears at the bottom of the screen. To scroll down one line to display the remaining commands, press the Return key. To scroll down one screenful, press the Space bar. Press any other key to return to the prompt.
If you are entering a command and the system interrupts with a message to your screen, you can recall your current command line entry by pressing Ctrl-L or Ctrl-R.
If you mistype a command entry, you can transpose the mistyped characters to the left of the cursor by pressing Ctrl-T.
You can change a set of letters to uppercase or lowercase with the following key sequences:
You can insert a code to indicate that the next keystroke should be treated as a command entry, and not as an editing key. This code is useful when you want to use a particular keystroke as an executable command. Enter the following command to insert a system code for this purpose:
Ctrl-V or Esc-QEnhanced editing mode is the default. If you are more comfortable with the editing mode of previous software releases, you can disable enhanced editing mode by entering the following command:
no terminal editingUse the following editing keys and functions for Software Release 9.1 and earlier.
Task | Keystrokes |
---|---|
Erase the character to the left of the cursor. | Delete or Backspace |
Erase a word. | Ctrl-W |
Erase a line. | Ctrl-U |
Redisplay a line. | Ctrl-R |
End configuration mode and return to the EXEC prompt. | Ctrl-Z |
Execute single-line commands. | Return |
To disable enhanced editing mode from within configuration mode, refer to the configuration guide or command reference manual for your server.
A menu is a displayed list of actions from which you can select without having to know anything about the underlying command-level details. One typical menu use is making connections and switching between connections, but there are many varied operations that an administrator can build into menus.
Your administrator will notify you if menus have been created for your use.
To invoke the menu, perform the following task at the EXEC prompt:
Task | Command |
---|---|
Specify the name of the menu to be invoked. | menu name |
The following example invokes the OnRamp menu:
cs101>
menu OnRamp
Welcome to OnRamp Internet Services
1 Read email
2 UNIX Internet access
8 Set terminal type
9 Exit menu system
A typical menu usually consists of a "banner" or title and up to nine menu entries.
The menu title is the identifying name for the menu. The menu title can be one or more lines of text that identify the menu, plus any other brief information about the use of the menu.
Each displayed menu entry consists of the selection number for that line and the text describing the action to be performed. To perform an operation listed in the menu, type the selection number listed to the left of the operation and press the Return key.
Menu selection numbers need not be contiguous. For the sake of consistency across menus, a particular number might be reserved for a special function (Help, Exit, etc.), regardless of the number of menu entries in a given menu. For example, menu entry 1 might be reserved for help across all menus, while menu entry 9 might be reserved as the exit.
Some menus contain submenus that are opened by selecting a higher-level menu entry. For example, menu entry 8 in the OnRamp menu example invokes the following submenu:
1 DEC VT420 or similar
2 Heath H-19
3 IBM 3051 or equivalent
4 Macintosh with gterm emulator
9 Return to previous menu
|