Tuesday, September 13, 2011

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

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



How to Use a Flash Drive As Memory With Linux OS on a PCthumbnail
Flash drives aren't as fast as RAM, but can function as memory.

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.



Difficulty:
Moderately Challenging

Instructions

    • 1
      Insert the flash drive into the PC's USB slot.
    • 2
      Open a terminal by clicking "Applications," "Accessories" and "Terminal." Type "mount" into the terminal window and press "Enter."
    • 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
      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
      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
      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
      Activate the swap memory with maximum priority by typing "swapon -p 32767 /dev/sdb1." Replace "/dev/sdb1" with the flash drive's device name from the mount command. Press "Enter."
    • 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.

No comments:

Post a Comment