Linux Views 3

Setting up swap space on Linux

[Check memory]

free (check memory)

[Create]

fallocate -l 1GB /swapdata (create a large file)

chmod 600 /swapdata (set permissions)

mkswap /swapdata (format as swap)

swapon /swapdata (enable swap)

vim /etc/fstab (add an entry)

#############################################

/swapdata    none    swap    sw    0    0

#############################################

[Remove]

swapoff /swapdata

rm /swapdata

Reactions

Comments 0

A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.

Comments appear after a review. The password is used again to edit or delete.