Support Support Downloads Knowledge Base Service Request Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[ScreenOS] How to create aliases

0

0

Article ID: KB12290 KB Last Updated: 05 Oct 2019Version: 4.0
Summary:

The purpose of this article is to provide instructions for creating aliases for the ScreenOS command line interface.

Symptoms:

ScreenOS is capable of using alias commands similar to that found in most Linux command line shells. Aliases can be used to create a shorthand command for longer, more complex commands that are used repeatedly.

Solution:

To create an alias for a command, log into the command line via the console port or SSH/Telnet.

Use the command:

set alias <alias command> <full command>

Example:

set alias db "get db stream"

The example above creates an alias called "db". When "db" is entered on the command line the command "get db stream", which retrieves the contents of the debug buffer, is executed.

Another example of using aliases is documented here below:-

You can use a 'show' command to display the equivalent of a 'get' command using the 'set alias' command. 

Example:

NS-> set alias ?
<string>             alias name (up to 16 characters)
NS-> set alias show ?
<string>             alias definition
NS-> set alias show get
NS-> show db str
DHCP: Read 52 bytes from large file
DHCP: Interface trust has 1 IPs
DHCP: Current time 4454888; saved time 4454810; elapsed time 78
DHCP: saved entry 0: 20.20.20.20 - 0000399fe419 - 4294967295 (committed, lease time remained 1440000)
## 16:08:24 : UF CPA DNS callback: in
## 16:08:24 : UF CPA DNS callback: state change to CPA_STATE_COMPLETE
## 16:08:24 : UF CPA DNS callback: in
## 16:08:24 : UF CPA DNS callback: state change to CPA_STATE_COMPLETE
NS-> show conf | i alias
set alias show "get"
NS->     

Modification History:
2019-10-05: Added example.
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Security Alerts and Vulnerabilities

Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search