Kill Android SDK Manager Process in Linux

Android SDK Manager is required to download the tools for the Android Application development. And its been observe that it gets hanged and even if you try to close it from GUI , you won't be able to close it. Doing the CTRL+ALT+DEL can come to the rescue but in virtual machine its not the solution. The best way for such situations is to kill the process.


And you just need to type:  kill <process id>
To know the 'Process Id', we need to know the processes which are currently running and for that we type:
                                                   ps -e

To see more details of the processes, we can use another command:
                                   ps -aux | more
Now we need to know the process id of the android sdk manager and to know that, you need to type:
                               ps -aux | grep 'android'
And it will give you the complete output which would look something like this:
pc 2424 0.4 2.6 469844 54700 ? Sl Jun16 2:52 java -Xmx256M - Dcom.android.sdkmanager.toolsdir=/home/pc/Documents/android-sdk-linux/tools -cla sspath /home/pc/Documents/android-sdk-linux/tools/lib/sdkmanager.jar:/home/pc/Do cuments/android-sdk-linux/tools/lib/swtmenubar.jar:/home/pc/Documents/android-sd k-linux/tools/lib/x86/swt.jar com.android.sdkmanager.Main root 3290 0.0 0.0 0 0 ? S 09:41 0:01 [kworker/0:3]
So here you can see the process id which is: 2424.
Note: If you try to find the process is using:
                                        ps -e | grep 'android'
You won't be able to see the output because the ps -e command doesn't have the full name.But to find the process with this command you need to type:
                                   ps -e | grep 'java'
It will give the same process id which is same as the process id returned by running the command: ps -aux | grep 'android'. So just verify the id for both processes for confirmation and go ahead..


Now, to kill the process, type in Terminal:
                                     kill 2424
If it doesn't kill the process as it might be used somewhere or by another resource, we need to kill it forcefully. So in that case we type:
                                   kill -9 2424
And we are good to go. Please change the process id as it will be different for your case. And Bingo, the process is gone. You can do the same for other processes also which are bothering you and are not going away.
Hope it helps.