It happens pretty often to me when I am compiling software in the background and suddenly everything starts to slow down and eventually freeze up [if I do nothing], as I have run out of both RAM and swap space.
This question assumes that I have enough time and resources to open up Gnome Terminal, search through my history, and execute one sudo
command.
What command can save me from having to do a hard reboot, or any reboot at all?