Skip to content

Instantly share code, notes, and snippets.

@bussiere
Created September 28, 2019 23:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bussiere/090cfe08f14df1cdab3a2ad9bd1c1eea to your computer and use it in GitHub Desktop.
Save bussiere/090cfe08f14df1cdab3a2ad9bd1c1eea to your computer and use it in GitHub Desktop.
mkdir /mnt/ramdisk
Then use the mount command to create a RAM disk.
mount -t [TYPE] -o size=[SIZE] [FSTYPE] [MOUNTPOINT]
Substitute the following attirbutes for your own values:
[TYPE] is the type of RAM disk to use; either tmpfs or ramfs.
[SIZE] is the size to use for the file system. Remember that ramfs does not have a physical limit and is specified as a starting size.
[FSTYPE] is the type of RAM disk to use; either tmpfs, ramfs, ext4, etc.
Example:
mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment