Wednesday, July 05, 2017

Kill Linux process that consumes all memory

Found on SatckOverFlow. I love it :

ps -eo pid --no-headers --sort=-%mem | head -1 | xargs kill -9
  • ps -eo pid --no-headers --sort=-%mem: display the process ids of all running processes, sorted by memory usage
  • head -1: only keep the first line (process using the most memory)
  • xargs kill -9: kill the process

Install Microsoft Visual Studio Code on a chromebook

My chromebook is fantastic! As it supports Linux integration feature, I can open a terminal and install every Debian based packages I want ...