Skip to content
Back home
The home of William Rendell
  • Home
  • Family
    • Holidays
    • Pets
    • Vehicles
  • Health and Fitness
  • Technical
    • Mikrotik
    • Computing
    • Renewable Energy
  • Privacy Policy
    • Cookie policy (UK)
  • Music
    • Harmonica
      • Easy
      • Intermediate
  • Contact
  • Search
Back home
  • Search
  • Home
  • Family
    • Holidays
    • Pets
    • Vehicles
  • Health and Fitness
  • Technical
    • Mikrotik
    • Computing
    • Renewable Energy
  • Privacy Policy
    • Cookie policy (UK)
  • Music
    • Harmonica
      • Easy
      • Intermediate
  • Contact
Home » Technical » Computing » Add swap file into linux
Computing Technical

Add swap file into linux

by William Rendell|Published February 11, 2026

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

If RAM = 4GB
Use swap = 4GB–8GB

If RAM = 8GB
Swap = 2GB–4GB is fine

  • Linux
  • network

You may also like

Change Chrome’s cache location
Published July 18, 2011

Change Chrome’s cache location

If you amend the shortcut for chome by appending this at the end of chrome.exe –user-data-dir=”type the full path of your own cache folder […]

Changing the management IP of a VMware ESXi 6.7 host
Published April 1, 2021

Changing the management IP of a VMware ESXi 6.7 host

Manually change the management IP of a VMware ESXi 6.7 host Open a SSH session to the current management IP and run […]

Published December 2, 2022

Block access to Facebook on Mikrotik

These are the domains to harvest IP addresses for; .facebook.com.fbcdn.net.facebook.net Add your local src IP Subnet to the rule below, then repeat […]

Change Centos IP address
Published July 30, 2015

Change Centos IP address

In common situation, “system ip address” is the ETH0 address. So edit /etc/sysconfig/network-scripts/ifcfg-eth0 with your favourite text editor and run service network […]

Post navigation

  • Previous post install Proxmox guest agent in Debaim
  • Back to post list
  • Next post Install Webmin on Rocky 10

© 2026  – All rights reserved

Powered by WP – Designed with the Customizr Theme