Just a repository I'm using to store useful Linux commands to me and possibly others.
This repository stores Linux commands I find very useful in my case. This may help others as well.
This command kills a process bound to a specified port (<PORT>
). It is recommended to run this command as root via sudo
.
PORT=<port>
kill $(sudo lsof -t -i:$PORT)
This command outputs the current clock speed of each CPU in MHz and updates the output every second.
watch -n 1 'cat /proc/cpuinfo | grep "MHz"'
This command kills all processes that matches a process name.
NAME=""
kill -9 $(pgrep -f $NAME)