Linux Skills
In this post, I will record the daily usage of linux, as well as the ways to resolve the common problems.
Table of Contents
How to use ramdisk in Ubuntu and Fedora?
In Fedora, the ramdisk is disabled by default, that is, it is compiled into
the kernel, but as a module, which will be loaded into the kernel when
actually used. So, it is necessary to compile the kernel manually to select the
ramdisk as the built-in modules.
In Ubuntu, the ramdisk support is enabled by default, so the steps are
easier compared to Fedora.
Using the following commands to list the ramdisk:
ls /dev/ram* |
The output will be like:
/dev/ram0 /dev/ram10 /dev/ram12 /dev/ram14 /dev/ram2 /dev/ram4 /dev/ram6 /dev/ram8 |
/dev/ram1 /dev/ram11 /dev/ram13 /dev/ram15 /dev/ram3 /dev/ram5 /dev/ram7 /dev/ram9 |
Format the ramdisk as an ext4fs:
mkfs.ext4 /dev/ram1 |
Then mount it:
sudo mount /dev/ram1 /mnt |
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。