creating a swapfile under Ubuntu linux

15 views
Skip to first unread message

Robert Citek

unread,
Nov 20, 2007, 11:22:35 a.m.2007-11-20
to Central West End Linux Users Group
At the last stllinux meeting someone asked about how to create a
swapfile. Here's how I do it under Ubuntu.

# become root
sudo su -

# create a 100 MB blank file
dd if=/dev/zero of=/swapfile bs=1M count=100

# setup file as swap
mkswap /swapfile

# enable swapfile
swapon /swapfile

# show swap
swapon -s

# disable swapfile
swapoff /swapfile

Regards,
- Robert

Reply all
Reply to author
Forward
0 new messages