Sometimes we need to add extra swap space in our Linux machine, so in this article, I’m going to show you how to add swap space to a Linux server.
We have two ways to adding swap space in Linux environment.
- Create swap space using the file.
free -m
swapon -s
dd if=/dev/zero of=/swap_file bs=1G count=1