Promena velicine swap fajla u Linuxu

Kod nekih novijih Linux distribucija, ukljucujuci Linux Mint 19.2 se ne koristi swap particija, vec swap fajl, koji se nalazi na root particiji.

Ako imate potrebu da promenite default velicinu swap fajla, to se radi na sledeci nacin:

Preporucujem da ovo radite odmah posle ukljucivanja, odnosno restarta kompjutera.

Pokrenite terminal i kucajte sledece komande:

Ova komanda iskljucije koriscenje swap-a:
sudo swapoff -a

Ako zelite da Vam velicina swap fajla bude 4GB, kucajte, kao u primeru count=4096, za velicinu fajla 8GB kucajte count=8192 itd…
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 status=progress

Kada dd zavrsi sa kreiranjem fajla, kucajte:
sudo chmod 0600 /swapfile
sudo mkswap /swapfile

Na kraju kucajte:
sudo swapon -a

Ako se posle ove poslednje komande ne aktivira swap file, onda restartujte kompjuter. Posle restarta ce biti aktivan swap fajl.

Author: Darth Ewok

Kompjuterski entuzijasta sa preko 30 godina iskustva. FUNDAMENTAL LINUX ADMINISTRATION https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-31c7f Fundamental System Security https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-0c6e2a End User Security Awareness https://www.cybrary.it/verify-certificate/ Certification Number: C-935c75f14-58b64df9 SECURITY MISCONFIGURATIONS https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-fc2853 Security Assessment & Testing https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-83cd23 CREATE A SUBNET https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-ff674 Peripheral Devices and Connectors https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-d97b10 Malware Fundamentals https://www.cybrary.it/verify-certificate/ Certification Number: SC-935c75f14-1ab14a

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.