Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

why lubuntu 20.04 freezes

You have no swap!

~$ free -h

              total        used        free      shared  buff/cache   available
Mem:          2.9Gi       671Mi       1.3Gi       141Mi       997Mi       2.0Gi
Swap:            0B          0B          0B
Lets create a /swapfile...

Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.

In the terminal...

Note: instructions reduced from a 4G, to a 1G /swapfile, due to disk space issues.

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=1024

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 3G RAM and 1G swap
Add this /swapfile line at the end of /etc/fstab... and confirm no other “swap” lines...

To edit, use sudo -H gedit /etc/fstab or sudo pico /etc/fstab

/swapfile    none    swap    sw      0   0
reboot                    # reboot and verify operation
Comment

PREVIOUS NEXT
Code Example
Shell :: mac find exclude a directory 
Shell :: how to deploy project on github 
Shell :: bash batch remove string from folder names 
Shell :: git show files that are not tracked 
Shell :: bash script: compare two string 
Shell :: Linux Tor enabled 
Shell :: initialize git on windows 
Shell :: angular cli ng clear cache cmd 
Shell :: upgrad g++ 
Shell :: sonarcube exclude rule via powershell 
Shell :: gnome nightlight reset 
Shell :: sed interst lines to a file 
Shell :: allocate memeory in hpc 
Shell :: 2 chaves ssh 
Shell :: complete command in zsh 
Shell :: command in git to close txt file 
Shell :: slidev 
Shell :: how to delete tempory folder in hpc bash 
Shell :: brew export path mac m1 
Shell :: canvas api python pypi 
Shell :: yes/no maybe 
Shell :: matplotlib change he yticks to two number after digit 
Shell :: zip update not removing files 
Shell :: ubuntu syslog.2.gz 
Shell :: on in get first two digit start with two numbers c# 
Shell :: mac vim freezin on .ts file 
Shell :: reduce directory display linux 
Shell :: youtube-dl Geo Restriction: 
Shell :: git-revision-webpack-plugin 
Shell :: ip tables Destination-NAT 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =