Create swap file

Allocate 2G swap file, set permissions, format and enable

fallocate -l 2G /swapfile && chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile

tool
linux133 commands
tags
linuxdiskmemory

More linux commands

  • swapon --show && free -h

    List active swap spaces and overall memory/swap stats

  • ip -br a

    Brief list of all interfaces with IPs

  • ip route show table all

    All routing rules including policy routes

  • ip route add 10.0.0.0/8 via 192.168.1.1 dev eth0

    Add a persistent-until-reboot static route

  • ip neigh show

    Neighbour (ARP/NDP) cache with reachability state

all 133 linux commands