AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Make ram disk7/30/2023 Now, one of the main disadvantages of a RAM disk is that it can only hold data temporarily, in the sense that, if a power failure occurs or if you shutdown or reboot the computer, the data of the RAM disk gets lost, permanently. Step 4: Now enter the below command to mount the newly created ram disk:Īs soon as you run this command, if it doesn’t popup automatically, open your file manager and you should see on its side panel, ‘RAM_disk’ has an entry which you can use to open it just like any other mounted media. P.S: After making your changes, make sure to save the changes, before closing the text editor. If you want to define it in Megabytes, say you want it to be 500 Megabytes, then the code should be: size=500M , where the ‘ G‘ is replaced by ‘ M‘ (and the number too). If you want to set it to 2 GB, then change ‘1’ to ‘2’, as simple as that. Using this code, we can easily define the desired size of the RAM disk, and as you might have guessed, I’ve highlighted that section of the code in Red ( size=1G - Note that there’s no space between the number ‘ 1‘ and the letter ‘ G‘). Tmpfs /mnt/RAM_disk tmpfs rw, size=1G,x-gvfs-show 0 0 Copy the below code and paste it in a new line, at the end of the ‘/etc/fstab’ configuration file (shown below): Step 3: Now let’s add an entry to the end of this configuration file so that the ‘/mnt/RAM_disk’ folder is mounted every time the operating system boots. Now use the below command to open the original file: Step 2: Now let’s open the ‘/etc/fstab’ configuration file (this file contains all the file systems that should be mounted upon the operating system’s boot-up) using the default text editor of Ubuntu (it’s called Gedit), but first, let’s make a backup using the below command: To create the folder, open up the terminal and enter the below command (When asked, enter the root or the administrator’s password): I’ll call this folder ‘RAM_disk’ which will be mounted into the RAM. I’ve chosen to create it in the ‘/mnt’ directory, but you can create it anywhere you like (if you do that however, then make sure to change the folder path accordingly). Step 1: Let’s a create folder for the RAM drive. The ‘ Basic Setup‘ should work any on GNU/Linux distribution, however, the steps laid out in the ‘ Enhancing the Functionality‘ will only work on Ubuntu 15.04 & later versions (I’ve tested this on Ubuntu 15.10), though, with minor changes (or maybe without any changes at all) they should work on other newer distributions, as long as they use systemd (a core part of ‘Linux’ that manages applications that run in the background, aka ‘daemons’). If all you need a RAM disk, then you don’t even have to follow all the steps either. If you know how to run a command with administrative privileges and know how to copy and paste commands from a webpage to your terminal window, then you already have all the qualifications!. You don’t have to be a ‘linux expert’ to do any of this. For setting things up, you’ll have to use the command-line a bit, but I assure you that this is extremely easy, if you follow my instructions. But for the average computer user having a RAM disk might not make a huge difference, still, if you frequently do things like compress large number of files etc, then you too can benefit by having a ram disk because if the files are in RAM, they can processed quite fast.Īnyhow, for whatever reasons, if you’re in need of a ram disk managing software for GNU/Linux, then this guide is intended for you. RAM disks can also be used not only to deliver better performance but to offload (read/write requests) the main storage device, thus prolonging its life as well (specially in a server environment).
0 Comments
Read More
Leave a Reply. |