I am in the process of making my notes public. This docs section is still work in progress. It currently is a summary of random tips for various things.
Found a mistake? Want to add something? Feel free to open an issue, send a pull request or an e-mail.
Disclaimer: I mostly worked with Debian and Debian derivatives. And yes, Linux is just the Kernel, I know.
Linux und ports
- What process is using/ blocking port?:
lsof -i:<port no>
- How can I kill process that blocks the port?:
kill $(lsof -t -i:<port no>)
kill -9 $(lsof -t -i:<porn no>)
- Useful links:
kill -9 #if necessary
ps -aux | grep firefox
pkill firefox # works too
F2 to open a new session if your system crashed.
- Show permissions recursive:
ls -Rla .
Umount target is busy
- Finding the process:
lsof | grep '<mountpoint of /dev/sda1>'A
- Some solution that I have not tested yet:
mount -o remount,ro /dev/device
lsof +f -- /dev/<devicename> | awk 'NR==1 || $4~/[0-9]+[uw -]/'
fuser -m /dev/<my-device>