Today I Learned

hashrocket A Hashrocket project

Kill process by name

While killing processes using their PID isn't hard, the process can be simplified further. You can kill a process by its name.

This is how you do it using PID:

ps aux | grep [process_name]
# copy the pid from the output
kill [PID] # paste pid

This is how it's done using the name of the process:

pkill [process_name]
# e.g. pkill rails
See More #command-line TILs