Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I created a swap partition of 512MB .My machine has 1 GB RAM. The swap entry is present in the /etc/fstab file. But when I give mount command the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    16

    How to enable the swap


    Hi,

    I created a swap partition of 512MB .My machine has 1 GB RAM. The swap entry is present in the /etc/fstab file. But when I give mount command the swap partition is not getting mounted. When I give free command or swapon -s command
    Filename Type Size Used Priority
    /dev/sda2 partition 522104 0 0

    How can I enable the swap ?
    Does the swap comes into effect only when the system goes out of memory.

    Thanks
    Jomy

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    to enable swap use:
    Code:
    swapon /dev/sda2
    though swap should be activated at boot.

    Swap is used to store multiples of things usually, e.g. if you have 5 emacs open, their will be multible uses of the memory for the same thing, so lets say four of these processes are put in the swap, while the other that's lot is used for all the sessions of emacs. Though when you fill up your RAM, usually the swap space then gets used for a wider range of things.
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •