IT/Unix

Creating swapfile in Linux

SAP_BASIS 2021. 11. 1. 09:21

1. Create empty swap disk file.

 dd if=/dev/zero of=/root/swapfile bs=1G count=20

 

2. Permission setting

 chmod 600 /root/swapfile

 

3. Make swapdisk

 mkswap /root/swapfile

 

4. Swap on

 swapon /root/swapfile

'IT > Unix' 카테고리의 다른 글

How to keep X11 display after su or sudo  (0) 2023.08.10
[Linux/Unix] Delete Semaphore  (1) 2016.03.22
[Linux] YUM 커널 update후 잔재 제거  (0) 2011.07.13
[AIX] alt disk backup  (0) 2011.05.27
NMON Analyser 3.3g Release  (0) 2011.05.25