How to create and use a Swap file December 27, 2022 03:55PM |
Admin Registered: 12 years ago Posts: 17,890 |
cd / dd if=/dev/zero of=swapfile1 bs=1024 count=524288 mkswap swapfile1 chmod 0600 swapfile1
swapon /swapfile1
total used free shared buff/cache available ..... Swap: 511Mi 0B 511Mi
NAME TYPE SIZE USED PRIO /swapfile1 file 512M 0B -2
# /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> LABEL=rootfs / ext3 noatime,user_xattr,acl,errors=remount-ro 0 1 /swapfile1 swap swap defaults 0 0 tmpfs /tmp tmpfs defaults 0 0