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

swap memory in ubuntu

sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
output 
Setting up swapspace version 1, size = 2 GiB (2147479552 bytes)
no label, UUID=fde7d2c8-06ea-400a-9027-fd731d8ab4c8
Copy
Comment

swap memory in ubuntu

sudo fallocate -l 2G /swapfile
Copy
Comment

PREVIOUS NEXT
Code Example
Shell :: git --init 
Shell :: CocoaPods could not find compatible versions for pod FlipperKit 
Shell :: uninstall grepper 
Shell :: how to install tar.xz file in ubuntu 
Shell :: cd back 
Shell :: ufw rules 
Shell :: grep -w flag 
Shell :: delete all git ignored files 
Shell :: fatal error: hiredis.h: aucun fichier ou dossier de ce type 
Shell :: new-alias vi notepad 
Shell :: how to install "adguard home" using snap store cli 
Shell :: git short version hash [by index] 
Shell :: bc command in linux 
Shell :: Install heroicons npm install @headlessui 
Shell :: linux architecture kernel 
Shell :: install lru 
Shell :: Undo commit and unstage all files 
Shell :: bash store directory list array 
Shell :: replace master branch entirely with another branch 
Shell :: sed bahs 
Shell :: Create Git respository 
Shell :: network error when calling api 
Shell :: mysql cannot change directory to /nonexistent 
Shell :: grep -R exlude directory 
Shell :: curl download with rate limit 
Shell :: push to an existing branch 
Shell :: Using sed to find and replace complex string (preferrably with regex) 
Shell :: rebuild all apps dokku 
Shell :: pi auto update and upgrade 
Shell :: ssh remove file command 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =