Recreating /dev/null in Solaris

This is a simple post to recreate /dev/null on a Solaris system. Firstly, we use the mknod command to make a special character device. Then we change ownership and permissions of the character device, and finally we link it to /dev/null.

# mknod /devices/pseudo/mm@0:null c 13 2
# chown root:sys /devices/pseudo/mm@0:null
# chmod 666 /devices/pseudo/mm@0:null
# ln -s /devices/pseudo/mm@0:null /dev/null