Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

In Unix, how do I kill another login session remotely?

You can kill a Unix login session remotely by sending a hangup signal (SIGHUP) to the process running the login session. To do this, follow the steps below:

  1. Identify the shell you want to kill. To determine your current tty, from your Unix shell prompt, enter: tty
  2. To show all of your running processes, enter: ps -fu username Replace username with your username.

  3. You should see something like this: PID TT STAT TIME COMMAND 13964 v5 I 0:00 elm 13126 ue S 0:00 -bash (bash) 13133 ue R 0:00 ps x 13335 v5 S 0:00 -bash (bash)

    In the first column, "PID" stands for "process ID". The second column shows the tty to which your processes are connected. The dash ( - ) before a process name shows that the process is a login shell.

  4. To remove the remote shell, look for the processes with a dash and choose the process number that is not for your current tty. Then issue the following command: kill -HUP processid Replace processid with the process ID number you identified.

When you send a SIGHUP (by entering kill -HUP or kill -1) to a login shell, all the processes that were started in the shell will be killed as well (unless they were in the background). SIGHUP is good because it allows applications like Elm and Emacs to exit gracefully, leaving your files intact.

Note: You cannot kill processes that are running on a computer different from the one you are logged into. For example, at Indiana University you can't kill processes running on Big Red from your Quarry account. This rule extends to individual nodes within clusters of Unix systems as well.

At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?

This is document adqw in domain all.
Last modified on May 13, 2009.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.