They all run mainstream operating systems, and are basically locked down PCs in a fancy box.
I feel like Xbox is the only console running a mostly mainstream OS. The Playstation series is based off of FreeBSD and but I think that’s at a base level and a majority of what’s added is custom proprietary code. Considering gaming on FreeBSD really doesn’t surpass Quake I’d say it’s quiet different.
I’ve seen the Switch’s OS described as
Proprietary OS, derivative of Nintendo 3DS system software (partially Unix-like via certain components which are based on FreeBSD and Android)