S
S
stimul7772021-09-15 16:24:21
linux
stimul777, 2021-09-15 16:24:21

How to change the swap file?

Hello everyone, it's ubuntu 20.04.
How to change the swapfile on it? It already exists and its size is 2GB, which is critically small. I'm not strong in Linux) Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
toxa82, 2021-09-15
@stimul777

sudo swapoff /swapfile #Выключить файл подкачки
sudo fallocate -l 4G /swapfile # Увеличить размер файла подкачки
sudo mkswap /swapfile # Пометить этот файл как файл подкачки
sudo swapon /swapfile # Включить файл подкачки

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question