ubuntu turn off swap
sudo swapoff -a && sudo sed -i '/ swap / s/^(.*)$/#1/g' /etc/fstab
ubuntu turn off swap
sudo swapoff -a && sudo sed -i '/ swap / s/^(.*)$/#1/g' /etc/fstab
how to swap ubuntu
# Check Current Swap
sudo swapon -s
# Create Swap File
sudo fallocate -l 4G /swapfile
chmod 600 /swapfile
# Make it to swap format and activate on your system
sudo mkswap /swapfile
sudo swapon /swapfile
# Make Swap Permanent
sudo vim /etc/fstab
# and add below entry to end of file
/swapfile none swap sw 0 0
# Check System Swap Memory
sudo swapon -s
free -m
# Update Swappiness Parameter
sudo vim /etc/sysctl.conf
# append following configuration to end of file
vm.swappiness=10
# Now reload the sysctl configuration file
sudo sysctl -p
create swapfile ubuntu
sudo mkswap /swapfile
create swapfile ubuntu
sudo chmod 600 /swapfile
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us