Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
Videos & KonferenzenSemperVideo: Der lange Abend des Datenschutz (IoT Firewall Teil 1)(28.09.2026 um 21:54 Uhr)
••••••••••
Videos & KonferenzenSemperVideo: Der lange Abend des Datenschutz (IoT Firewall Teil 1)(28.09.2026 um 21:54 Uhr)
••••••••••
Intelligence View
⚡ tsecurity.de Intelligence

Expanding swap file

Introduction Well you want to expand your swap file? Not have enough money to buy an extra RAM? Well, you are in the right place, In this blog I will guide you through the steps of expanding your preexisting swap file by successive 1 GiB…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Introduction



Well you want to expand your swap file? Not have enough money to buy an extra RAM? Well, you are in the right place, In this blog I will guide you through the steps of expanding your preexisting swap file by successive 1 GiB or more!









Steps to increase swap file size




  • Disable swap file



We use swapoff command to turn off the swap since we are modifying the swap file, It will take some time depending upon the data in swap




sudo swapoff /swapfile







  • Append 1 GiB to the end of swapfile



By executing the below command, 1 GiB will be added at the end of the swap file, you can run more than once to add more swap memory.




sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 oflag=append conv=notrunc






Explanation of above command :





  1. dd a command line tool used for creating and copying data


  2. if argument to specify the input file


  3. /dev/zero its a special file in linux, when read gives the values as 0


  4. of argument to specify the output file


  5. bs argument to specify the block size


  6. count number of blocks needed to be written, since we selected 1M, it will run 1024 times to give 1024M (1Mx1024)


  7. oflag=append tells the dd to append to the swap file.


  8. conv=notrunc This option tells
    dd not to truncate the output file to zero length before writing.




  • Create the swap file with updated size



The command below setup the swap file.




sudo mkswap /swapfile







  • Turn on the new swap file



The command below turns on the swap file so if needed applications might use it.




sudo swapon /swapfile












Summary



So for a quick summary, here are the commands to expand your swap by 1 GiB.




sudo swapoff /swapfile
sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 oflag=append conv=notrunc
sudo mkswap /swapfile
sudo swapon /swapfile









Conclusion



System monitor



I increased my swap by running the dd command twice so 2 GiB will be appended on my existing swap resulting in 2.5 GiB.



Nice! You have increased your swap file! Now go open a few extra tabs! have fun! Have any questions? well comment below! I will try to hit you up as soon as possible!

2. Cyber Threat Intelligence & Forensik

CTI Threat Relationship Graph2 Knoten / 1 Relationen
CVE / Incident Software MITRE ATT&CK CWE Weakness IoC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten Expanding swap file

Thematisch verwandte Begriffe: Expanding, swap, file · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-55157 | Token Optimizer MCP measures token savings per AI coding agent, optimize…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag