I'd break your problem into 2 parts:
1) How do I find the processes started by me? Run this:
ps -u `whoami`
whoami is just in case you don't know the name of the account you are using, otherwise just type the name of the account without the back quotes.
This will list all processes that can be deleted by your account.
ps command will list the process number, the TTY, Time, and CMD. The process ID is the first column. Use that number to kill the process. Be careful while killing the process. You might break something if you kill the wrong process.
To kill a process you will use the
kill command, which sends a SIGNAL to the process. The signal indicates what the process should do. For example, sending a
-1 to the process will ask it to reload the configuration file; sending a
-2 is equivalent to pressing the Control+C on that process;
-9 will cause the kernel to abandon the process, without communicating it to the process.
Supposing that ps -u
whoami returned something like
PID TTY TIME CMD
4333 pts/1 00:00:00 fish
4335 ? 00:00:00 fishd
4816 ? 00:00:00 intellij
4868 ? 00:50:42 java
4939 ? 00:00:19 fsnotifier64
7667 ? 02:49:08 firefox
7698 ? 00:00:00 unity-webapps-s
And you wanted to kill the
firefox process by its process id, then you'd do:
kill -1 7667
Then you'd re-run the same
ps command and check if the process was still running. If it is still running, then do a
kill -2 7667
working your way up to
To kill all processes started by your account, enter
kill <level> -1. Same as before: work your way up to
If you know the name of the process you can simply go
killall <processname>, where the is what you are trying to kill. For example:
killall fish (fish, in this sense, is the Friendly Interactive SHell).
killall can be found here: http://manpages.ubuntu.com/manpages/hardy/man1/killall.1.html