System Status
Buy Now
  • Email & Apps
  • Office 365
Login
  • MyRackspace Portal
  • Cloud Control Panel
  • Rackspace Webmail Login
  • Cloud Office Control Panel
  • Support Home
  • How-To
  • Developer Documentation
  •  Blogs 
    • Expert Insights Tech Blog
    • Rackspace Blog
    • Solve: Thought Leadership

Support Network

End-to-End Multicloud Solutions.   Solving Together.â„¢   Learn more at Rackspace.com

How–To Home

Cloud Servers

  • Introduction
  • FAQ
  • All Articles

Log off existing sessions in Linux

Last updated on:  2020-11-23

Authored by:  James Andrade


Note: You have to be root to end other users' sessions.

  1. Check current user sessions by using the w command:

     ~]# w
     17:49:20 up 198 days,  5:23,  3 users,  load average: 0.00, 0.01, 0.05
     USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
     root     tty1                      16:48   59:28   0.08s  0.08s -bash
     root     pts/0    ord.secure-acces 16:50    0.00s  0.10s  0.02s w
     james    pts/1    ord.secure-acces 17:49    5.00s  0.03s  0.03s -bash
    
  2. Log off a user:

     ~]# pkill -KILL -u james
    
  3. Confirm:

     ~]# w
     17:50:07 up 198 days,  5:24,  2 users,  load average: 0.00, 0.01, 0.05
     USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
     root     tty1                      16:48    1:00m  0.08s  0.08s -bash
     root     pts/0    ord.secure-acces 16:50    7.00s  0.10s  0.01s w
    

Share this information:

©2020 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License

See license specifics and DISCLAIMER

About Rackspace
  • About
  • Customer Stories
  • Events
  • Programs
Blogs
  • The Rackspace Blog
  • Expert Insights Tech Blog
  • Solve: Thought Leadership
  • News
  • Contact Information
  • Legal
  • Careers
Site Information
  • Style Guide for Technical Content
  • Trademarks
  • Privacy Statement
  • Website Terms
Support Network
  • Support Network Home
  • Rackspace How-To
  • API Documentation
  • Developer Center
  • ©2020 Rackspace US, Inc.