
Cara membuat swap di linux
Step by step :
- Alokasi swap $ sudo fallocate -l 1G /swapfile
- Set permission chmod 600 untuk swap $ sudo chmod 600 /swapfile
- Menandai swapfile di system linux sebagai swap $ sudo mkswap /swapfile
Output :
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes) no label, UUID=7e1faacb-ea93-4c49-a53d-fb40f3ce016a - Enable swapfile $ sudo swapon /swapfile
Output :
swapon –show
NAME TYPE SIZE USED PRIO
/swapfile file 1024M 0B -2 - Set swap secara permanent di fstab $ sudo echo ‘/swapfile none swap sw 0 0’ | sudo tee -a /etc/fstab

Di tulis oleh: Nanda Anubis