How to Use a Flash Drive As Memory With Linux OS on a PC

Written by chris hoffman Google
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Use a Flash Drive As Memory With Linux OS on a PC
Flash drives aren't as fast as RAM, but can function as memory. (usb flash drive image by Bosko Martinovic from Fotolia.com)

Linux operating systems store open files and programs in a computer's memory, or RAM. When the system lacks enough physical RAM, Linux stores the additional data on a swap partition on a hard drive. You can use a swap partition on a USB flash drive instead of the hard drive. This method is similar to the ReadyBoost feature found in Windows Vista and later versions of Windows. Using a flash drive as memory decreases the life of the flash drive, because flash memory has a limited amount of write capability. All files on the flash drive will be erased.

Skill level:
Easy

Other People Are Reading

Instructions

  1. 1

    Insert the flash drive into the PC's USB slot.

  2. 2

    Open a terminal by clicking "Applications," "Accessories" and "Terminal." Type "mount" into the terminal window and press "Enter."

  3. 3

    Look for the flash drive's device name on the line containing "/media/disk" or "/media/usbdisk" in the output of the "mount" command. The device name looks similar to "/dev/sdb1."

  4. 4

    Become the root user by typing "sudo su" on Ubuntu or "su" on other distributions of Linux. Press "Enter." Type your password and press "Enter."

  5. 5

    Unmount the flash drive by typing "umount /dev/sdb1" into the terminal window. Replace "/dev/sdb1" with the flash drive's device name from the mount command. Press "Enter."

  6. 6

    Make a swap partition on the flash drive by typing "mkswap /dev/sdb1" into the terminal window. Replace "/dev/sdb1" with the flash drive's device name from the mount command. Press "Enter."

  7. 7

    Activate the swap memory with maximum priority by typing "swapon -P32767 /dev/sdb1." Replace "/dev/sdb1" with the flash drive's device name from the mount command. Press "Enter."

  8. 8

    Verify the flash drive is functioning as swap memory space by typing "swapon -s" into the terminal window. Press "Enter." Search for the flash drive's device name in the command's output.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.