Log in Go to the main page Page Discussion History Go to the file list Go to the site toolbox

Alias command

From NetworkCommands


Image:Cisco-logo-large.gif

A command available on most Cisco paltforms; used to create, modify or delete command aliases. A command alias is a user-assigned alternative command name that is entered at the CLI instead of the normal command. The user-assigned name would normally be shorter than the original command.

Command aliases accept any variables and keywords that the full command normally would.

Contents

Built-In Aliases

The following aliases are 'built-in' (but won't show up in configuration files or the output from a show run);

 Alias:                Executes Command:
 h                     help
 lo                    logout
 p                     ping
 r                     resume
 s                     show
 u                     undebug
 un                    undebug
 w                     where

Image:Vm-power-on-medium.png Usage Syntax

Configuration Context: Global Configuration

alias configuration-mode alias-name command

There are a great deal of Configuration Modes, some of the most commonly specified modes are;

  • exec - Commands executed in priviledged mode such as show and debug commands.
  • interface - Interface configuration mode commands
  • dhcp - DHCP Configuration mode commands
  • line - Line configuration mode commands
  • router - Router configuration mode commands

The alias-name is the alternative name you want to use to execute a command

The command is the command and any additional parameters you wish to execute when entering the alias-name

Image:Vm-power-on-medium.png Usage Examples

A number of examples are provided below. The logic behind the abbreviations used is as follows:

  • Whole words are abbreviated to a single letter, i.e. show = s
  • Acronyms are not abbreviated, i.e. ip remains as ip EXCEPT acronyms that can be considered whole words in themselves, such as NAT or PAT, so nat = n, pat = p
  • Compound phrases are abbreviated using each component word, i.e. access-list = al
alias exec sv show version
alias exec svl show vlan
alias exec sms show memory summary
alias exec spc show process cpu
alias exec sid show interface description
alias exec sipal show ip access-list
alias exec sipib show ip interface brief
alias exec sipntv show ip nat translations verbose
alias exec sipr show ip route
alias exec sis show interface status
alias exec sri show run interface


alias exec tm terminal monitor
alias exec tl0 terminal length 0
alias exec tl24 terminal length 24
alias exec ths20 terminal history size 20

Image:accessories-text-editor-v2-medium.png Usage Notes

Note that aliases on CSS platforms are stored on the local disk (usually a PCMCIA device) and cannot be accessed if the disk has been removed or has failed.

Image:icemon-medium.png Related Commands

The show aliases command displays built-in and user defined aliases that have been configured


Image:internet-group-chat-small.png We really do appreciate all feedback so please do send your comments, suggestions or corrections to steve#networkstuff.eu (replacing the # with an @)



Site Toolbox:

Personal tools
This page was last modified on 1 July 2008, at 14:57. - This page has been accessed 55 times. - Disclaimers - About NetworkCommands
Powered by MediaWiki