Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-03-2004, 12:52 AM   #1
LQ Newbie
Registered: Jul 2004
Location: Oklahoma
Distribution: Redhat 9
Posts: 2

Rep: Reputation: 0
Closing /killing other sessions

Anyone help me with closeing sessions that are open? When loggin into the machine now I am seeing 3 users (all me). Cannot find the command to kill the other 2. Do not really want to restart the machine everytime I leave one open. (Redhat 9)

Thanks, Chris
Old 07-03-2004, 08:23 AM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
You can get the list of running processes by running
ps aux
In the first column you have process owner, in the second - process number (PID) and in the last one - program name. To kill one of them type
kill PID
(you need to be logges in as the process owner or as root).

For example, take one line of ps aux output:
mara      2227  0.0  0.3  2780 1648 pts/1    S    12:19   0:00 /bin/bash
To kill it, run
kill 2227
Note that it's sometimes normal when you're logged in multiple times to see your login name printed more than once by 'users'.
Old 07-03-2004, 04:01 PM   #3
LQ Newbie
Registered: Jul 2004
Location: Oklahoma
Distribution: Redhat 9
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Thanks

Thank you Mara. That will help!
Old 03-27-2006, 01:00 PM   #4
LQ Newbie
Registered: Feb 2006
Location: Alabama
Distribution: Slackware 10.2/11.0
Posts: 23

Rep: Reputation: 15
Having same problem

Slackware 10.2
sendmail 8.3

...but the above does not work. What happens is the user remains logged in, but the PID changes to something higher.

Basicly, the users are not logging out. The scenerio is this...

I log in as root, once, twice, three times. Now I have 3 active ssh sessions open, along with 3 root users. I log out 2 of them. I still have 3 users logged in. I kill the PID, but for whatever PID I kill, that user is imediatly issued another PID, and remains logged in.

This is what i see after I reboot, and only one user is logged in....

root 2888 0.0 0.0 1380 484 tty1 Ss+ 11:46 0:00 /sbin/agetty 38400 tty1 linux
root 2889 0.0 0.0 1380 484 tty2 Ss+ 11:46 0:00 /sbin/agetty 38400 tty2 linux
root 2890 0.0 0.0 1380 484 tty3 Ss+ 11:46 0:00 /sbin/agetty 38400 tty3 linux
root 2891 0.0 0.0 1380 484 tty4 Ss+ 11:46 0:00 /sbin/agetty 38400 tty4 linux
root 2892 0.0 0.0 1380 484 tty5 Ss+ 11:46 0:00 /sbin/agetty 38400 tty5 linux
root 2893 0.0 0.0 1380 484 tty6 Ss+ 11:46 0:00 /sbin/agetty 38400 tty6 linux

strange, huh? Any help is appreciated.


Last edited by aubrey-calm2; 03-27-2006 at 01:02 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closing Ports Murdock1979 Linux - Security 1 09-23-2005 10:44 AM
Closing these ports... greygoose80 Slackware 2 12-20-2004 12:12 AM
Two X sessions? LinuxSeeker Linux - General 3 04-07-2004 04:39 PM
Sessions BajaNick Linux - General 0 07-30-2003 10:19 PM
closing procces dkc_ace Linux - General 7 01-19-2003 03:21 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration