|
The user interface for your system provides several different command modes. This publication focuses on just one command mode: user EXEC mode. For more information about privileged EXEC mode, refer to the configuration guide or command reference guide for your server product.
Specifically, this chapter describes the following topics:
The EXEC commands available at the user level are generally used to connect to remote systems, change terminal settings on a temporary basis, perform basic tests, and list system information. Refer to the configuration guide for your server product for information about entering privileged EXEC mode.
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 server, and PT for a protocol translator, unless it has been changed during initial configuration using the setup command. (Refer to the getting started guide for your server product for information about the setup command facility.) The following example of a communication server prompt and a protocol translator prompt:
CS>
PT>
You can also change the name of the server using the hostname command as described in the configuration guide for your server product.
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.
After entering the command at the system prompt, press the Return key to execute the command at the user level.
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 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
The list of commands might vary slightly from this example, depending upon how your server has been configured.
The previous section, "Understanding the User EXEC Command Mode," indicated that you can obtain help about available commands by typing a question mark (?) at the system prompt. You can also get a list of any command's associated keywords and arguments with the context-sensitive help feature. You can enter the following commands to obtain help:
When using context-sensitive help, the space (or lack of a space) before the question mark (?) is significant. To obtain 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 form of help is called word help, because it completes a word for you.
To list keywords or arguments, enter a question mark (?) in place of a keyword or argument. Include a space before the ?. This form of help is called command syntax help, because it reminds you which keywords or arguments are applicable based on the command, keywords, and arguments you have already entered.
The following example shows 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 example displays a list of keywords used 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 provides syntax checking with an error location indicator. The error location indicator is a caret (^), and appears at the point in the command string where you have entered an incorrect command, keyword, or argument. The error location indicator and interactive help system allow you to 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 the entry "my-host." Enter the command again up to the point of the error location indicator and include a question mark (?) at the end of the string to bring up context-sensitive help.
The user interface for this software release provides a history, or record, of commands you have entered. You can complete the following tasks:
To set the number of command lines the system will record, 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 product. 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:
Although enhanced editing mode is enabled by default, you can disable it and revert to the editing mode of previous software releases. See "Disable Enhanced Editing Mode" later in this chapter.
You can re-enable the enhanced editing mode while in user EXEC mode. Enter the following command:
terminal editingUse the following keystrokes to move the cursor back and forth on the command line for editing.
Task | Keystrokes |
Move the cursor back one character. | Press Ctrl-B or press the left arrow key.1 |
Move the cursor forward one character. | Press Ctrl-F or press the right arrow key.1 |
Move the cursor to the start of the command line. | Press Ctrl-A. |
Move the cursor to the end of the command line. | Press Ctrl-E. |
Move the cursor back one word. | Press Esc-B. |
Move the cursor forward one word. | Press Esc-F. |
If you cannot remember a complete command name, you can use the Tab key to allow the system to complete a 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 the letters "term" are 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 to indicate an error. Enter a question mark (?) to obtain a list of commands that begin with that set of characters.
For example, there are two commands in user mode that start with "log":
mayday> log?
login logout
mayday> log
The system provides a buffer containing the last ten items you have 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. | Press Ctrl-Y |
Recall the next buffer entry. | Press Esc-Y |
If you press Esc-Y more than ten times, you will cycle back to the first buffer entry.
Enter any of the following keystrokes to delete command entries if you make a mistake or change your mind while entering a command:
Task | Keystrokes |
---|---|
Erase the character to the left of the cursor. | Press the Delete or Backspace key. |
Delete the character at the cursor. | Press Ctrl-D. |
Delete all characters from the cursor to the end of the command line. | Press Ctrl-K. |
Delete all characters from the cursor to the beginning of the command line. | Press Ctrl-U or Ctrl-X. |
Delete the word to the left of the cursor. | Press Ctrl-W. |
Delete from the cursor to the end of the word. | Press Esc-D. |
When you use the help facility to list available commands, the list might be longer than the terminal 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 screen to display the remaining commands, press the Space bar. Press any other key to return to the prompt.
If you are entering a command and the system suddenly sends a message to your screen, you can easily 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 capitalize or lowercase words or capitalize a set of letters with the following key sequences:
You can insert a code to indicate that the keystroke immediately following should be treated as a command entry, and not as an editing key. This 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 returns 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 product.
|