If you get error like “/dev/null is not a character device!”, do not panic. It is because you have set the value /dev/null set to a folder/file or anything else.
To overcome this issue, remove the /dev/null first.
rm -f /dev/null
Next, create the /dev/null as character device.
mknod /dev/null c 1 3
Now, you have done and you may check if it is created correctly.
[email protected] [~]# ls -l /dev/null crw-rw-rw- 1 root root 1, 3 Dec 6 15:59 /dev/null