Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

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
Comment

ubuntu turn off swap

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

PREVIOUS NEXT
Code Example
Shell :: shrink terminal current directory 
Shell :: homebrew Unknown command: cask 
Shell :: exit git log 
Shell :: Ubuntu check free space by 5 ways 
Shell :: net user administrator active yes 
Shell :: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory" 
Shell :: find port and kill 
Shell :: shutdown from command prompt windows 7 
Shell :: Testing your SSH connection with GitHub 
Shell :: vs code permission ubuntu 
Shell :: jasmine.clock().install() jest 
Shell :: ssh end connection after executing script 
Shell :: use alternative composer version cpanel ssh 
Shell :: vmplayer kernel headers not found 
Shell :: create new item from terminal 
Shell :: how to install insomnia in ubuntu 
Shell :: linux snap app list 
Shell :: nginx gzip 
Shell :: extract tar gz overwrite 
Shell :: difference between -s and --save 
Shell :: Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs 
Shell :: microPY lib 
Shell :: install mongodb with brew 
Shell :: remove docker ubuntu 
Shell :: git shortcuts 
Shell :: virtual box config networkt config ubuntu 
Shell :: config git editor vim 
Shell :: descomprimir tar gz 
Shell :: use nvm to install latest node 
Shell :: how to safely remove partner modules magento2 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =