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