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
    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. LFS426 Linux Performance Tuning
    08 Sep » 11 Sep - New York
  2. LFS520 OpenStack Cloud Architecture and Deployment
    08 Sep » 11 Sep - Virtual
  3. LFD320 Linux Kernel Internals and Debugging
    15 Sep » 19 Sep - Virtual

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