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 in the Linux machine ?
Best Answer
Install
openssh-server
on Ubuntu and PuTTY on Windows. Then you can get a shell on your Ubuntu machine from the Windows one.Once logged into your Ubuntu machine remotely, you can use
kill
orpkill
orkillall
as you prefer. I findpkill
simplest if you just want to kill based on the process's name. For example:pkill firefox
If, however, you wanted to kill a specific process whose PID (process ID) you know (possibly from looking through the output of
ps -ef
), you can usekill 1234
You can combine kill signals with these to say how they should be killed. The default is 15, or SIGTERM (term = terminate), which is a polite request to please close now. If a process doesn't respond to that, 9 (SIGKILL) is popular. See
man 7 signal
for more information about signals. To use this withkill
orpkill
you'd simply add-9
for example:kill -9 firefox