Linux has become more and more popular among computer users. As a result, many users may encounter Linux File System size modification problems when learning Linux, here we will introduce how to modify the file system size in Linux. Here we will share it with you. By default, the system will load/dev/shm, which is called tmpfs. Some people say it is different from ramdisk.
Like a virtual disk, tmpfs can use your RAM, but it can also use your swap partition for storage. In addition, a traditional virtual disk is a block device and requires commands such as mkfs to actually use it. tmpfs is a file system, not a block device. You only need to install it, it can be used.
Tmpfs has the following advantages:
1. The size of the dynamic file system.
2. Another major benefit of tmpfs is its lightning speed. Because the typical tmpfs file system will completely reside in RAM, reading and writing can be almost instantaneous.
3. tmpfs data will not be retained after restart, because the virtual memory is essentially easy to lose. Therefore, it is necessary to execute some scripts such as loading and binding.
Usually use/dev/shm for shared memory shm_open, shm_unlink ). /Dev/shm is a temporary document system tmpfs), which can be mounted from/etc/fstab. Therefore, standard parameters such as "size" can be used to increase or decrease the tmpfs size on/dev/shm. By default, its size is half of the system RAM)
Resize/dev/shm
1) view the size
Df-h/dev/shm
2) modify the size
Vi/etc/fstab
Tmpfs/dev/shm tmpfs ults, size = 4096 M 0 0
3) remount
Umount/dev/shm
Mount/dev/shm
4) view the modified size
Df-h/dev/shm
Modify the file system size in Linux and control the size of the dev/shm tmpfs file system at will.
- Operation notes: Linux hard disk partition
- Install db2 in Linux
- Install PPStream network TV in Linux
- Protect your Linux operating system
- Checks whether Linux servers are attacked by hackers.