If you’re like most Ubuntu users, you probably have a process running in the background that you don’t really know how to kill. Well, fear not! In this article, we’ll show you how to kill a process by its name from the Ubuntu command line. To start, open a terminal window and type: sudo ps -ef | grep “name” This will list all of the processes running on your computer. The one we’re interested in is called name. To kill it, type: kill name ..
These techniques can be useful in shell scripts, where you wouldn’t know the process ID and would need to restart or kill a process.
killall -v irssi
pkill irssi
kill ps -ef | grep irssi | grep -v grep | awk ‘{print $2}’