LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to log out from all instances of unix? (https://www.linuxquestions.org/questions/linux-general-1/how-to-log-out-from-all-instances-of-unix-276439/)

u4u 01-11-2005 03:54 AM

how to log out from all instances of unix?
 
i have log in to my unix home directory through telnet from windows machine.
While working with vi editor, suddenly it stopped responding to any keystroke. So i have closed the telnet window by clicking on "X" on top right corner. so that window got closed but the instance of unix is still alive.
So next time i have log in to unix through telnet. Now i have typed the command 'who' and it shows me two instances of the same user. One is previous and second is that i have just log in. Now if i want to log out from both the instances of unix then how can i do it? Because whenever i typed 'exit' or cntrl D it will exit from current instance but that previous is always alive.
Please help me as early as possible.

kees-jan 01-11-2005 07:22 AM

First you type
Code:

w
to list the users logged in. Observe the column "TTY". Remember the values printed there for each instance you want to log out. Next, execute
Code:

ps aux
This also has a column "TTY". Find the process ids (columnt "PID") of the instances you want to kill. Next, you can kill them by typing
Code:

kill 123
or
Code:

kill -9 123
where 123 is an example process id, which should be replaced with the correct ones.

Note that the missing session is harmless and will eventually (after one minute or so) go away by itself, so the above exercise is pretty much useless.

Groetjes,

Kees-Jan


All times are GMT -5. The time now is 05:15 PM.