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

[Junos] Different ways to use the "request system logout" command



Article ID: KB36232 KB Last Updated: 31 Dec 2021Version: 3.0

This article discusses the different options to log out sessions manually, with a specific scenario where the same user is logged in simultaneous sessions.


Sessions can be logged out or closed on the basis of PID [process ID], terminal, or username. All sessions of the same user can also be logged out by using the <user> all option. These options are mentioned below: 

root@device> request system logout ?
Possible completions:
  <[Enter]>            Execute this command
  all                  Logout all sessions owned by user
  pid                  Management process ID for user
  terminal             Terminal user is logged in to
  user                 Name of user
  |                    Pipe through a command

Sometimes, the same user may open simultaneous multiple sessions. These sessions share the same username. The fastest method to log out these sessions is by using the terminal option.


  1. Get the list of active sessions logged-in to the device by using the command show system users. Then select the terminal session that you want to log out manually. 

root@device> show system users                       
 8:11PM  up 16 days,  9:11, 4 users, load averages: 7.35, 7.19, 7.36
USER     TTY      FROM                              LOGIN@  IDLE WHAT
root     v0       -                                29Aug20 7days cli           
root     pts/0                    8:11PM      - -cs           
root     pts/1                    8:09PM      - cli           
root     pts/2                    8:09PM      2 cli           
  1. Notice the TTY value for the session to manually logout. The session is logged out by using the command request system logout terminal <TTY Value>

root@device> request system logout terminal pts/0 
logout-user: done
  1. The selected session is logged out.

root@device> show system users                       
8:16PM  up 16 days,  9:16, 3 users, load averages: 7.56, 7.29, 7.34
USER     TTY      FROM                              LOGIN@  IDLE WHAT
root     v0       -                                29Aug20 7days cli           
root     pts/1                    8:09PM      - cli           
root     pts/2                    8:09PM      6 cli 

This is applicable to all devices running Junos OS. For further details, refer to the command reference guide for request system logout.

Modification History:

2021-12-31: Modified synopsis to address feedback; provided correct usage of "all" keyword because it was incorrect earlier; other minor non-technical edits

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