Home Learn Linux Linux Answers Systems Management How to create swap partition in Linux at command shell?
  • 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
    3 years ago
    0 0
Please register/login to answer this question. Click here to login
Similar Questions Found
Questions from category Systems Management

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

Linux Training / Board

/** BC-056 Ameex changes to add tracking code - 2016-01-22 **/ ?>