HOME - Recent Changes - Search:

Academic Work


Personal

* pot de départ


dblp


(:twitter:)

-----

[ edit | logout ]
[ help | sandbox | passwd ]

Using a swap file

#############################

Question

How to use a swap file instead of a swap partition?

Solution

This tip is from http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/ . Here I make a short summary.

(1) Create a swap file:

dd if=/dev/zero of=/swapfile1 bs=1024 count=524288

Here 524288 is the block size (512MB * 1024).

(2) Mark it as a swap file:

mkswap /swapfile1

(3) Activate it:

swapon /swapfile1

(4) Edit the file /etc/fstab and add the following line:

/swapfile1 swap swap defaults 0 0

Now it'll be activated after each reboot.

(5) Verify if it's used:

free -m
Cloud City


anime | bash | blogs | bsd | c/c++ | c64 | calc | comics | convert | cube | del.icio.us | digg | east | eBooks | egeszseg | elite | firefox | flash | fun | games | gimp | google | groovy | hardware | hit&run | howto | java | javascript | knife | lang | latex | liferay | linux | lovecraft | magyar | maths | movies | music | p2p | perl | pdf | photoshop | php | pmwiki | prog | python | radio | recept | rts | scala | scene | sci-fi | scripting | security | shell | space | súlyos | telephone | torrente | translate | ubuntu | vim | wallpapers | webutils | wikis | windows


Blogs and Dev.

* Ubuntu Incident
* Python Adventures
* me @ GitHub


Places

Debrecen | France | Hungary | Montreal | Nancy


Notes

full circle | km


Hobby Projects

* Jabba's Codes
* PmWiki
* Firefox
* PHP
* JavaScript
* Scriptorium
* Tutorials
* me @ GitHub


Quick Links


[ edit ]

View - Edit - History - Attach - Print *** Report - Recent Changes - Search
Page last modified on 2010 April 01, 02:35