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

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 swapon --show
Source: linuxize.com

create swapfile ubuntu

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
Source: linuxize.com

create swapfile ubuntu

sudo fallocate -l 1G /swapfile
Source: linuxize.com

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.

Shell/Bash相关代码片段

zsh compinit

linux check docker daemon running

git how to uncommit a commit --amend

remove containers with images and volumns

tauri cargo

can you upgrade the ram in msi p65 creator

ubuntu ssh add private keys

ssh-copy-id proxy jump

postgresql shell

powershell allow port 27017 udp tcp

ufw allow from interface

mac compress folder

shell escape

bash scripting cheat sheet

how to install prisma

uploadthing install

docker pull stuck on waiting

golang nodemon

powershell alias for git

winetricks.sh

gnome software not showing nvidia

sed remove lines between matches

cannot install dotenv python

Download ProtonVPN Fedora

give file execute permission mac

git diff show only changed lines

WINE keyrings setup

install opencv runtime only on linux ubutnu

Wine PGP key setup

smartctl fedora install

linux reload sysctl.conf

npm install formidable

docker build print logs

kill connection using process id

connections to port netstat command windows

linux adapter command

see existing users linux

resolv.conf search

nativefier ubuntu

ubuntu dart sdk path flutter

kubernetes ssh into pod

pass variable from one script to another bash

rm nvidia driver linux ubuntu

ngrok for ubuntu

where are pip packages installed

git authen failed

bun list global packages

ubuntu os update login black screen

adb packages path

windows command create file

swithc pphh versoij ubuntu

apache2 installation missing files

uninstall simple screen recorder

insteall .deb

cpptraj rmsd each traj

kill all dockers

upgrade to rustc 1.70.0

ubuntu search process by pid

Shell/cURL POST request example

grep word not line

how to uninstall nvm itself ubuntu

parameterized function in shell script

windows 10 symbolic link folde

zustand redux

open terminal in any folder in finder

install lamp stack ubuntu 20.04

how to make start docker desktop as root

ubuntu font reset

ubuntu copy fiolder

open wsl shell in current folder

clang++ ubuntu

remixicon install

docker compose v2 install ubuntu

pg add citext

postgres add citext

git for default branch change

ubuntu container exited after run in docker

linux run command as root on startup

remove docker

flatpak list repos