Support Support Downloads Knowledge Base Case 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

Restoring a hung CLI 'edit' mode if CTRL+Z is pressed by error instead of CTRL +D after load merge/override terminal on EX series Ethernet switches

0

0

Article ID: KB11491 KB Last Updated: 21 May 2009Version: 2.0
Summary:
When a portion of the EX switch configuration is displayed in another window on your terminal or computer and you want to copy it to another EX switch and activate it, the load merge terminal or load override terminal command comes in handy. This is a great technique when you are copying configuration text from a browser or email window or when you are propagating identical or similar configurations from one EX switch to another.

Including the override option with the load override terminal command replaces the entire candidate configuration with the contents of the terminal you are loading. If you are just adding a new section to the configuration, use the load merge terminal command instead.

Symptoms:
If the user types CTRL +Z instead of CTRL +D after load merge/override terminal the user root is first dumped into the shell prompt. Once the user root logs into the CLI and then goes into edit mode, the edit mode hangs and does not accept any commands.

For example:
root@switch>configure
root@switch# load merge terminal
[Type ^D at a new line to end input]
poe {
    interface all;
}
^Z pressed here instead of ^ D by Error

Suspended
root@switch%
Solution:
In order to restore the CLI edit mode view output, follow the steps described below:


  1. Execute the command 'fg' at the shell prompt:
    user@switch%fg
    cli


    NOTE: At this point the CLI process comes back to the foreground
  2. Paste the configuration snippet again and Press CTRL +D this time
    poe {
    interface all;
    }
    ^D
    load complete
    user@switch# commit
    commit complete

NOTE: If you have entered the 'edit' mode after pressing CTRL+ Z by error and the edit mode is not responsive, follow the steps described below:

  1. Press CTRL Z to escape the mode
    root@switch>cli
    root@switch#edit

    <this edit mode is not responsive>

    ^Z
    Suspended
    root@switch%
  2. Execute the command 'jobs' to view suspended jobs and kill the CLI suspended job.
    root@switch%jobs
    [1] +Suspended cli

    root@switch% kill %1
    [1] Terminated cli
  3. Enter the CLI mode, then edit mode; View the modified configuration and commit the changes
    root@switch%cli
    root@switch>edit
    root@switch# show poe
    interface all;

    root@switch# commit
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos 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