1

When I run

df | grep tmpfs | sed "s/[0-9]/*/g"

I get

tmpfs            *******      ****   *******   *% /run
tmpfs            *******       ***   *******   *% /dev/shm
tmpfs               ****         *      ****   *% /run/lock
tmpfs            *******         *   *******   *% /sys/fs/cgroup
tmpfs            *******        **   *******   *% /run/user/****

Is there any reason why I shouldn't use any of the directories as a RAM Disk?
(except /run/lock which has a small size)

Note that the last directory is equivalent to the output of echo /run/user/$UID

.....

I could mount my own with

mkdir RAM_DISK
mount -t tmpfs -o size=3G tmpfs RAM_DISK/

but then I'd have to issue the commands on every reboot

(unless /etc/fstab is modified)

1 Answers1

2

df displays the amount of disk space available on the file system containing each filename argument. Every partition must mount on a dir,such as /home, assign a special fs(maybe ext2) on Linux. First column of df shows the partition of the filesystem (tmpfs just show itself).

5 partition mounted on the dir you list assigned tmpfs by Linux here. And the partition of these 5 partition is managed by Linux VM.

Tmpfs is good to Linux considering the related functions of these dirs (tmpfs pros and cons).

And the corresponding functions you can find from this url. tmpfs (Why so many?)

Poor english...