Linux.com

Home Learn Linux Linux Answers Systems Management How to create swap partition in Linux at command shell?
Answers
  • U may use hard disk partition for additional swap space. 1st see how much space it is used like free -k command. If u have an additional hard disk, (or space available in an existing disk), create a partition using fdisk command. Now setup newly created partition as swap area using the mkswap command like mkswap /dev/sdaX (here X is no of partition). To make this swap space partition available even after the reboot, add the following line to the /etc/fstab file like
    # cat /etc/fstab
    /dev/sdaX swap swap defaults 0 0
    to verify run command as: swapon -s

    But remember this is an expert area job, do at ur own risk. Better take bkup of ur necessary files/ folders.

    Answered by rechil_colin
    One year ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Systems Management

Upcoming Linux Foundation Courses

  1. LFD331 Developing Linux Device Drivers
    25 Aug » 29 Aug - Virtual
    Details
  2. LFD411 Embedded Linux Development
    25 Aug » 29 Aug - Santa Clara, CA
    Details
  3. LFS422 High Availability Linux Architecture
    08 Sep » 11 Sep - Raleigh, NC
    Details

View All Upcoming Courses

Community Answers - Search


Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board