If we have to make USB
drive as RAM in linux then we have to follow bellow steps.
Step-1: Find Partition name of USB drive
First we have to get the partition name of our USB drive with following command.
sudo
fdisk -l
Step-2: Unmount USB drive
Now we will unmount our USB drive with following command.
sudo umount /dev/sdc1
Step-3: Create Swap file in USB drive
After unmount USB drive we will able to create swap file.
sudo mkswap /dev/sdc1
Step-4: Turn on Swap file
Now we turn on our swap file to make USB drive as RAM. Here we set file with higher priority.
sudo swapon -p 32767 /dev/sdc1
Step-5: Checking Swap file activation
If we have to check swap file is activated or not then we will use follow command.
cat /proc/swaps
No comments:
Post a Comment