Swap on parrot os

I want to create a swap for my laptop. I have 500GB HArdrive and 2GB Ram. kindly help me on the necessary steps. +260971698031 WhatsApp. Really need your help!

Hi :slight_smile:
What exactly is the problem ?
Can you please give us more info about your issue and some steps you have done before asking help ?

maybe create a swapfile ? see https://linuxize.com/post/create-a-linux-swap-file/

These don't really seem to work for me.

what is it that does NOT work? Parrot OS is debian-based so the commands are all debian.

sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -- show

My test:

user@u18s:~$ sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576
[sudo] password for user: 
1048576+0 records in
1048576+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 9.88655 s, 109 MB/s
user@u18s:~$ sudo chmod 600 /swapfile
user@u18s:~$ sudo mkswap /swapfile
Setting up swapspace version 1, size = 1024 MiB (1073737728 bytes)
no label, UUID=147981db-b497-4f37-a2e3-5193bf43a30a
user@u18s:~$ sudo swapon /swapfile
user@u18s:~$ sudo swapon --show
NAME      TYPE  SIZE USED PRIO
/swap.img file  1.9G 524K   -2
/swapfile file 1024M   0B   -3

As you see from the output, /swapfile was created and is active. To make it permanent, edit /etc/fstab with sudo and your preferred editor and add: /swapfile swap swap defaults 0 0

Please see - https://community.parrotsec.org/ where you might get more information about your OS.

1 Like

I dual boot Parrot and Ubuntu Mate. I use gparted to shrink partitions and make swap partitions. You must use the mounted partition to shrink the unmounted partition or use gparted on it's own media. (cd,dvd, usb).
Is this a new single OS installation?
Are you trying to make a dual boot by adding Parrot?
Have you finished your Parrot OS installation but want to increase or add swap?
While the basics are all the same, the steps will be different. More information would help people help you.

hi guys!
I created swap file but the Hibernate button is still missing.
I have Parrot OS 5.1

thanks

1 Like

Welcome @Derek to the community!

Hi Derek,

For Hibernate on Parrot OS, look here:

1 Like