Linux Ubuntu under memory virtual hard disk

Source: Internet
Author: User

Memory virtual hard disk command (virtual 2000M HDD)

Free

sudo mkdir/mnt/ramdisk
sudo mount-t tmpfs tmpfs /mnt/ramdisk -o size=2000m

boot automatic memory virtual hard disk
with Fstab

sudo vim/etc/fstab

Add (need to build rda1 folder before media)
tmpfs /mnt/ramdisk tmpfs size=2000m 0 0,ubuntu

so each boot on multiple memory of the hard drive, the effect is equal to win RAMDisk Plus

in fact, Ubuntu itself built a lot of virtual hard disk in the system, such as/DEV/SHM can be used directly.
Enter the DF-AHT command in the terminal to see.
file system capacity has been used with available% mount points
/dev/sda7 reiserfs 2.0G 764M 1.3G 39%/
proc Proc 0 0 0-/proc
/sys SYSFS 0 0 0-/sys
varrun tmpfs 1.1G 201k 1.1G 1%/var/run
varlock tmpfs 1.1G 0 1.1G 0%/var/lock
udev tmpfs 1.1G 119k 1.1G 1%/dev
devshm tmpfs 1.1G 0 1.1G 0%/dev/shm
devpts devpts 0 0 0-/dev/pts
LRM Tmpfs 1.1G 40M 1.1G 4%/lib/modules/2.6.22-14-generic/volatile
/dev/sda10
reiserfs 9.6G 3.4G 6.3G 35% /Home
/dev/sda9 reiserfs 5.1G 3.4G 1.7G 68%/usr
Tmpfs tmpfs 2000M 0 2000M 0% /mnt/ramdisk
SECURITYFS
SECURITYFS 0 0 0-/sys/kernel/security

all marked Tmpfs are virtual hard disks, such as the /mnt/ramdisk I created


Linux Ubuntu under memory virtual hard disk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.