Horje
how to swap ubuntu Code Example
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
ubuntu turn off swap
sudo swapoff -a && sudo sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
create swapfile ubuntu
sudo mkswap /swapfile
Source: linuxize.com
create swapfile ubuntu
sudo chmod 600 /swapfile
Source: linuxize.com




Shell

Related
fsl reg Code Example fsl reg Code Example
docker-machine create digitalocean Code Example docker-machine create digitalocean Code Example
bash how to download password protected files Code Example bash how to download password protected files Code Example
sudo add permissions to user Code Example sudo add permissions to user Code Example
bash tee stdout and stderr Code Example bash tee stdout and stderr Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11