Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is it possible to kill a process running in an Ubuntu machine from a Windows (XP) machine remotely connected via LAN?

I can kill the process in a windows machine from a remote windows machine (in LAN) by the following command:

taskkill /S system /U username /P password  /IM process.exe

Is there any thing like that to kill the process running on the Linux machine?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Do you have SSH or Telnet access to the Linux machine? (Typically, SSH is more reliable in trouble situations, but either can work.)

Login, use top, ps, or pgrep to get the process id (pid) of whatever needs killing, and then kill away with kill PID or kill -9 PID on the command line. If you have a new enough system, you can even kill processes from within top by choosing one and pressing 'k'.

Furthermore, ssh and rsh can be used to remotely execute commands without the whole interactive login session, if that's what you end up needing in the future:

$ ssh USER@HOSTNAME COMMAND
share|improve this answer
    
+1, and I just want to add that on Windows, you can use PuTTY to ssh to a Linux/Unix machine chiark.greenend.org.uk/~sgtatham/putty –  phunehehe Oct 23 '10 at 3:36
    
I would just note that you want to avoid kill -9 if you can. Try kill PID twice, then try kill -INT PID before trying kill -9. SIGKILL is untrappable and thus doesn't allow the program to clean up after itself. –  Steven D Oct 23 '10 at 4:18
    
You're right. Of course, I find kill -9 satisfying when angry. ;D –  Kevin Cantu Nov 6 '10 at 11:27
    
Better not use telnet; your password will be send in the clear. (although if you LAN only has completely trusted people on it, it won't hurt). –  kasterma Dec 2 '10 at 18:16
    
Seriously? Let the admin worry 'bout that. If he's still got rlogin available, he might as well use it. :P –  Kevin Cantu Dec 3 '10 at 8:30
add comment

Windows has these tools for remote management built-in to the shell. For remote management of a *nix host, you need to get a shell on the remote host. As suggested above, you need an ssh client of some sort. You can use a windowed application like putty (linked above), or there is a native port of openssh for win32 that doesn't require cygwin. You can find it here: http://www.nomachine.com/contributions.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.