FreeBSD-12.0-RELEASE-amd64, when I list all the files in
/dev, I don't see
/dev/dsp (note there's no output after the first command), but when I list the file by explicitly specifying its name, it is found. Even more weird, when I then
ls -al /dev again (and grep for
dsp, like in the initial command), the
/dev/dsp file disappears again, but now
# ls -al /dev | grep dsp # ls -al /dev/dsp crw-rw-rw- 1 root wheel 0x56 May 24 07:46 /dev/dsp # ls -al /dev | grep dsp crw-rw-rw- 1 root wheel 0x56 May 24 07:46 dsp0.0
The above has been done by running the ISO image in QEMU, but I was able to reproduce this on real hardware, too. Just boot with the default parameters, then select "Shell" in the menu that appears, then enter the commands from above:
qemu-system-x86_64 -soundhw hda -cdrom FreeBSD-12.0-RELEASE-amd64-disc1.iso
And for the record:
# cat /dev/sndstat Installed devices: pcm0: <Generic (0x1af40022) (Analog)> (play/rec) default No devices installed from userspace.
/dev to me sounds like a good way to find out which devices / disks FreeBSD "sees", coming from a Linux background. There's probably some good reason (creating nodes on demand?) why it doesn't appear, but is there some other way to ask the system "what devices did you actually find and are available?" without having to "touch" the files for them to magically appear?