To create 1Gb swap partition:
Switch to superuser and run the following commands:
$ sudo su
root# dd if=/dev/zero of=/mnt/swap.0 bs=1024 count=1048576
root# mkswap /mnt/swap.0
root# echo "/mnt/swap.0 swap swap defaults 0 0" >> /etc/fstab
root# swapon /mnt/swap.0
root# exit
To check if swap space was properly enabled:
$ free -m
or
$ sudo swapon -s
Switch to superuser and run the following commands:
$ sudo su
root# dd if=/dev/zero of=/mnt/swap.0 bs=1024 count=1048576
root# mkswap /mnt/swap.0
root# echo "/mnt/swap.0 swap swap defaults 0 0" >> /etc/fstab
root# swapon /mnt/swap.0
root# exit
To check if swap space was properly enabled:
$ free -m
or
$ sudo swapon -s
Комментариев нет:
Отправить комментарий