Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    Is this answer still current? I'm on CentOS 7 and I've just overwritten my /dev/null by mistake, the udevadm trigger --sysname-match=null trick didn't work for me, while mknod -m 0666 /dev/null c 1 3 worked perfectly. Commented Jan 24, 2019 at 10:11
  • @Bozzy I know it worked with the pre-systemd udev. I haven't tried recently, but as far as I know this should still work. If you add --verbose, does it list /sys/devices/virtual/mem/null ? Commented Jan 24, 2019 at 22:49
  • Yes, it lists that. I've tried to overwrite again /dev/null on my dev machine, but strangely enough I'm unable to do it here, so I can't do a more in-depth analysis now... Commented Jan 25, 2019 at 10:18