Rebuild accidentally deleted /dev
Solution 1
I believe the contents of /dev
are automatically rebuilt when you reboot.
To quote someone else:
When you start the system, the "udev" facility examines the hardware configuration (according to established rules) and dynamically creates the entries in /dev.
Solution 2
When rebooting is NOT an option (you are working remotely on a machine in usa and you are on safari) this should do the trick:
udevadm control --reload-rules
udevadm trigger
Related videos on Youtube
Philippe Blayo
One of the best experience in my life has been to enjoy pair programming with developers that value clean code and simple design. It's called eXtreme Programming and I hope one day I'll have the opportunity to do it again.
Updated on September 17, 2022Comments
-
Philippe Blayo over 1 year
How to rebuild
/dev/
on an Ubuntu lucid where everything in/dev/
were accidentally deleted?MAKEDEV std
andMAKEDEV pty
aren't enough, which isn't surprising on a system usingudev
.I haven't rebooted yet because I fear I would lose access to my system.
-
AtomHeartFather over 2 years+1, because rebooting is for adding new hardware
-
Nuclear about 2 yearsDoes not work - creates only directories block char disk dri, but not all files that were there