There are several (mostly Linux-based) Operating Systems that you can use for IoT but they wouldn’t allow you to get the best out of your setup and that’s the reason why IoT-focused distros exist.
Here is a list of the 5 best Operating Systems you can use for your Internet of Things projects.