######################################################################### # Searchable Keyword: swap swapon mkswap dd Linux swap file Adding, deleting, on and off To add a swap file on a linux host and have the system begin to us it. - First create a file with no holes for swap use. dd if=/dev/zero of=swapfile1 bs=52k count=5000 - Intialize it for swap use on a Linux host mkswap swapfile1 - Tell the host to use new swap file swapon ./swapfile1 - List physical and swap area memory. # free total used free shared buffers cached Mem: 231424 228636 2788 0 2112 27480 -/+ buffers/cache: 199044 32380 Swap: 1044264 571708 472556 To remove and delete a swap file from a linux host. - swapoff ./swapfile1 - rm -rf ./swapfile1 # free total used free shared buffers cached Mem: 231424 228928 2496 0 236 21016 -/+ buffers/cache: 207676 23748 Swap: 784272 530900 253372 See also Solarisnotes on swap #-------------------------------------------------------------------------------#