2 sudo mount -t tmpfs -o size=1G none /mnt/tmpfs
--------------------------------------------------------------------------
To use a tmpfs, you need to mount it. You can mount your tmpfs directory using the mount command as follows:
```
# mount -t tmpfs -o size=1024m tmpfs /mnt/tmpfs
```
The above command will create a 1024 MB tmpfs directory under the /mnt/tmpfs. You can now use it like any other directory.
To make your system use tmpfs by default, you can edit the /etc/fstab file and add an entry for your tmpfs.
For example, if your tmpfs is located under the /mnt/tmpfs directory, you can add the following line to fstab:
```tmpfs /mnt/tmpfs tmpfs defaults,noatime,mode=1777,size=1024m 0 0```
Once you save the fstab file, your system will automatically mount the tmpfs directory when it starts up.
No hay comentarios:
Publicar un comentario