From the course: Linux Foundation Certified System Administrator (LFCS) Cert Prep

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Configure and manage swap space

Configure and manage swap space

- [Instructor] Now, let's look at how to configure and manage Swap Space in Linux. In this lesson, we'll discuss how we can create a so-called swap partition. Swap is an area where Linux can temporarily move some data from the computer's RAM. To understand this mechanism, let's go through an overly simplified scenario. Let's imagine we have a computer with four gig of RAM. We open a video editor, and this uses up two gig of RAM. We open an audio editor, and this needs another two gig. Now we have no more free memory, but we have a two gig swap partition. Although no more RAM is available, we can still open Chrome. Well, how is this possible? Well, when we want to open Chrome, the following happens. Linux sees no more RAM is available, but it also sees that we didn't use the video editor in the last hour. It's basically just sleeping there, inactive, so it decides that it can move the data and memory used by the video editor to our swap partition. By moving data from RAM to swap it…

Contents