I'm new to Linux. When I try to create a directory in the /dev
folder it's happening smoothly but after reboot all the created folders have disappeared.
I tried to create a folder in another folder, like /etc
. There, created folders do not disappear. I tried it as a normal user and as a root user but the same thing happens.
How to create a directory under /dev
that stays there permanently?
/dev
was usually just a directory that was part of the root filesystem, and what the OP was doing would just work. Any (Unix) filesystem can contain block-device or char-device file types, just like named pipes or symlinks or other non-regular file types./dev
is not as special as/proc
and/sys
are: you can create your own dirs in it. On some systems, it's just a normaltmpfs
mount that user-space software (udev
) usesmknod
to populate with device files. (devtmpfs
lets the kernel create device nodes there for you, without udev)mount
ordf /dev
will clearly show that/dev
is a special mount, so your overall point is certainly fair.