Quickly turn swap off on a Linux system

Turning off swap is adviced for Kubernetes installations:

sudo sed -i '/ swap /s/^\(.*\)$/#\1/g' /etc/fstab
sudo swapoff -a