Skip to main content

Ubuntu: Create swap partition

A swap file allows an operating system to use hard disk space to simulate extra memory.

$ sudo fallocate -l 2G /swapfile
$ sudo chmod 600 /swapfile
$ sudo mkswap /swapfile
$ sudo swapon /swapfile
Create swap file
Create swap file
Make swapfile permanent
Adjust the swappiness property
Adjust the swappiness property

Make swap partition on Debian 10 VM micro.f1 running on GCP

tuyen@gcpfreetier-vm1:~$ sudo fallocate -l 1G /swapfile
tuyen@gcpfreetier-vm1:~$ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
tuyen@gcpfreetier-vm1:~$ sudo chmod 600 /swapfile 
tuyen@gcpfreetier-vm1:~$ sudo mkswap /swapfile 
tuyen@gcpfreetier-vm1:~$ sudo swapon /swapfile 

Then edit /etc/fstab file: add to the end of file

...
/swapfile swap swap defaults 0 0

Finally, run sudo mount -a

Popular posts from this blog

Printer Support

Microsoft SQL Versions

Source:  https://support.microsoft.com/en-us/help/321185/how-to-determine-the-version-edition-and-update-level-of-sql-server-an -- Check version -- PRINT @@VERSION Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64)  Oct 19 2012 13:38:57  Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor) -- Check version -- PRINT @@VERSION Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64)  Dec 28 2012 20:23:12  Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) -- Check version -- PRINT @@VERSION Microsoft SQL Server 2012 ( SP4 ) (KB4018073) - 11.0.7001.0 (X64)  Aug 15 2017 10:23:29  Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor) -- Check version -- PRINT @@VERSION Microsoft SQL Server 2012 ( SP4-GDR ) (KB4057116) - 11.0.746...

Hydra: Notes

Hydra v9.1 (c) 2020 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).