There are a number of ways to kill a process if you know the name of the process. Here’s a couple different ways you can accomplish this. We are going to assume that the process we are trying to kill is named irssi
kill $(pgrep irssi)
killall -v irssi
pkill irssi
kill `ps -ef | grep irssi | grep -v grep | awk ‘{print $2}’`
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.
- › How to Manage Processes from the Linux Terminal: 10 Commands You Need to Know
- › Force Quit an Unresponsive Graphical Application in Ubuntu
- › ExpressVPN Review: An Easy-to-Use and Secure VPN for Most People
- › Here’s How Mozilla Thunderbird Is Making a Comeback in 2022
- › 4 Ways to Ruin Your Smartphone’s Battery
- › This Is How Steve Jobs Killed Adobe Flash
- › What Can You Do With the USB Port on Your Router?
- › 10 Things Blocking Your Wi-Fi Signal at Home