Skip to content

Instantly share code, notes, and snippets.

@st3b1t
Last active July 21, 2023 20:07
Show Gist options
  • Save st3b1t/e8e1b0efaf3ebabf72d9da3a12a81d88 to your computer and use it in GitHub Desktop.
Save st3b1t/e8e1b0efaf3ebabf72d9da3a12a81d88 to your computer and use it in GitHub Desktop.
create ramdisk on a Linux distro
#!/bin/sh
#path of the ramdisk
PATH=/media/ram
#automount ad startup
AUTO=",auto"
#disk size
SIZE=2G
sudo mkdir -p /media/ram
sudo echo "tmpfs $PATH tmpfs size=$SIZE,rw$AUTO,user,noatime,x-gvfs-show 0 0" >> /etc/fstab
sudo mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment