Creating SWAP file on Linux
Facebook
Reddit
Twitter
Whatsapp

Show active swap:
swapon --show
Show free space:
free -h
Check available HDD space:
df -h
Create swap:
fallocate -l 3G /swapfile
Modify permissions:
chmod 600 /swapfile
Make swap:
mkswap /swapfile
Enable swap:
swapon /swapfile
Initialize on startup:
echo '/swapfile none swap sw 0 0' | tee -a /etc/fstab
Improve speed & swappiness:
nano /etc/sysctl.conf
Add the following at bottom of file:
## Swap Configuration
vm.swappiness=10
vm.vfs_cache_pressure=50
Subscribe my updates via
Email

Most Popular Posts
- ShopNx - The assistant manager for influencers
- Frontendfun marketplace for software projects
- Complete steps to configure elasticsearch on Ubuntu
- Configure Vultr for Nodejs Deployment
- Appointment Booking Microservice using Javascript Fullstack
- 100+ most effective ways to promote a new blog for free
- Steps to Configure Digital Ocean Droplet for Nodejs Application Deployment
- Appointment Booking using Angularjs, Nodejs, Mongodb
- Send email with PDF attachment using PHP
- Simple task manager application using Angularjs PHP Mysql
- Steps to Configure Amazon EC2 for Nodejs app deployment
- Inventory Manager Using Angularjs Mysql Php
- User authentication using Angularjs, PHP, Mysql
- Demo of a simple CRUD Restful php service used with Angularjs and Mysql
- Simple file upload example using Angularjs
- Generate PDF using PHP from Mysql database
- Creating REST API using Nodejs and consuming in Angularjs
- Simple project demonstrates how to send email using Nodejs
- Voting system similar to stackoverflow using Angularjs PHP and Mysql
- Angularjs datagrid paging, sorting, filter using PHP and Mysql
- Useful database helper class to generate CRUD statements using PHP and Mysql
- Online Shopping Mega Menu using Angularjs, PHP, Mysql
- How to create a facebook style autocomplete using Angularjs
- Steps configuring PHP Cron Jobs - Godaddy
- How to change Mysql password
- A simple Angularjs web app that converts text to url format
- Creating SWAP file on Linux