00:00hello friends please don't forget to subscribe like share and comment and will not become a member
00:05in my bootstrapping videos the ones for arch linux and debian i forgot to set up a swap
00:15partition it's one of the options for swap you may have other options like z ram z swap or swap
00:24file i thought of showing you how to set up swap file instead of the swap partition as an option
00:32for your linux operating system it's something like the virtual memory whenever your ram is full
00:41it is used it's one of the options there are also many other things where you use your swap
00:48partition or file the first command that you may need to run is this one f allocate dash l and
00:58then
00:58the size that you would like to allocate for your swap file in my case i will go with three
01:05gigabytes
01:05and i will put it under home swap file password here
01:17all right sounds like it works in case such thing didn't work
01:27you run sudo dd if equals slash dev slash zero of equals swap file
01:45here the full path in my case it can be something like home swap file
02:02bs
02:06equals one m one megabyte count
02:11equals this one you type it in megabytes if we want to say two gigabytes it becomes 2048
02:23and then status
02:28equals progress
02:31i don't need to run this command you run it in case
02:38you weren't able to run the other command which is f allocate
02:43i will put this in a command like this
02:49all right and then we set the file permissions to 600 home swap file like this and then sudo
03:07sudo mk swap
03:13home swap file
03:21and then sudo swap on
03:28home swap file it can be under any path since it's simply a file like this you can check through
03:38the block devices
03:40you can also have more than and it is more than a type for swap
03:49hmm
03:51this is your arm
03:53it didn't appear it didn't appear somehow
03:59we can also add this to the it uh slash etc slash fs tab to make it permanent
04:07uh slash home
04:12swap file
04:16and then here home
04:20swap file
04:24none
04:29none
04:32swap
04:35defaults
04:380 space 0 save
04:45and exit
04:47clear
04:50now let me show you the last commands i run i run like this
04:57so we have
05:00all these commands
05:08and then sudo
05:10to verify
05:12what we have show
05:16so we have
05:18zero as i said to you
05:20and swap file
05:22we can reboot the system
05:24to see if the changes
05:27are persistent
05:29i will do that now
05:31computer rebooted
05:33let's see
05:34if
05:35the configurations persist
05:39and
05:39they do
05:41i'm signing out
05:43and peace
Comments