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

Android 2.2 is now on my HTC Desire
Published October 1, 2010

Android 2.2 is now on my HTC Desire

At last! I finally got the upgrade from 1.15.61.10 to 1.22.61.1 on my HTC Desire. That meant that I would be able […]

Published August 1, 2022

MailScanner Domain admin release Bad Content

Here’s a setting for domain admins: /var/www/html/mailscanner/conf.php

TCPDUMP to sniff headers
Published October 11, 2013

TCPDUMP to sniff headers

This tcpdump command will grab the first 1024 bytes (vs. smaller 68 or so) and line buffer the output for all packets […]

Published April 8, 2024

Make VOIP traffic a priority

Below is a simple example of how to use QOS for VOIP in ROS /ip firewall mangleadd action=mark-connection chain=prerouting comment=\“Mark Voip Connections […]

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