Expand swap partition-Ubuntu manual Configuration

Source: Internet
Author: User
Tags sleep function

Because of the automatic partition used during installation, my swap partition is more than 800 mb. Recently I plan to use the sleep function. I found that the swap partition is always unsuccessful. It is reported that the swap partition is not large enough, originally, UBUNTU used swap partitions to suspend the system, and my machine had 2 GB of memory. Therefore, to use the suspension function, we need to expand the swap partition.

I have a post discussing many things. The steps are simple: [discussing] How to expand swap partitions?

The procedure is as follows:

Dd If =/dev/Zero of =/swapfile COUNT = 2048 BS = 1024 K
Mkswap/swapfile
Swapon/swapfile

The first step is to divide a swap space, the second step is to make the file system into a swap partition, and the third step is to enable the swap partition.

The problem I don't understand now is whether the original swap partition is useless. How can I release it?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.