Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to change swap space on ubuntu

# Disable Swap
sudo swapoff /swapfile
# Edit Swapfile to desired size, 2G, 4G etc
sudo fallocate -l 2G /swapfile
# Enable Swap again
sudo swapon /swapfile
# You can check your new swap with
sudo swapon --show
Comment

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

increase swap size ubuntu


https://docs.rackspace.com/support/how-to/create-remove-swap-file-in-ubuntu/

//changes on this line only
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 oflag=append conv=notrunc
The above command will append 1GiB of zero bytes at the end of your swap file.
Comment

PREVIOUS NEXT
Code Example
Shell :: Homebrew PHP appears not to be linked. Please run [valet use php@X.Y] 
Shell :: bash check if number is greater than 
Shell :: How to restart MongoDB in Linux 
Shell :: convert pem to ppk ubuntu 
Shell :: composer require maatwebsite/excel install 
Shell :: how to uninstall kernel jupyter 
Shell :: fake cnpj 
Shell :: brew update git 
Shell :: metasploit install kali linux 
Shell :: bash colors 
Shell :: scan network for devices linux 
Shell :: install en_web_core md 
Shell :: ubuntu uninstall mosquitto 
Shell :: command not found: neovim 
Shell :: sudo: traceroute: command not found 
Shell :: imagemagick convert heic to jpg mac 
Shell :: search through installed packages arch 
Shell :: rar unrar mac 
Shell :: how to uninstall app from terminal ubuntu 
Shell :: install pyqt5 tools 
Shell :: how to unrar in linux 
Shell :: bash multiple commands one line 
Shell :: show public ip ubuntu 
Shell :: save git username and password 
Shell :: search guard docker 
Shell :: how to install geoquery in r 
Shell :: list mounted drives linux 
Shell :: command line weather 
Shell :: linux get docker compose logs 
Shell :: linux test if string exists in file 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =