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?
/devwas 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./devis not as special as/procand/sysare: you can create your own dirs in it. On some systems, it's just a normaltmpfsmount that user-space software (udev) usesmknodto populate with device files. (devtmpfslets the kernel create device nodes there for you, without udev) – Peter Cordes Dec 26 '20 at 02:35mountordf /devwill clearly show that/devis a special mount, so your overall point is certainly fair. – Peter Cordes Dec 26 '20 at 02:36