Skip to content

Instantly share code, notes, and snippets.

@RELATO
Last active November 15, 2022 07:08
Show Gist options
  • Save RELATO/d603ba5ec21f5f0e76f5a64257d4cb82 to your computer and use it in GitHub Desktop.
Save RELATO/d603ba5ec21f5f0e76f5a64257d4cb82 to your computer and use it in GitHub Desktop.
Commands to create in memory disk on Ubuntu 16.04

In memory ( RAM ) disk

Use the following commands:

  • Creating the RAM disk:
$ sudo mkdir /mnt/ramdisk
$ sudo vi /etc/fstab

and add this entry:

tmpfs /mnt/ramdisk tmpfs rw,size=200M,x-gvfs-show 0 0

where 200M is the size of the RAM disk.

$ sudo mount -a

  • Deleting the RAM disk:
$ sudo umount /mnt/ramdisk
$ sudo rm -r /mnt/ramdisk
$ sudo vi /etc/fstab

and delete the last entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment