I want to know if it is possible. I don't mean one of those emulators, I mean replace the whole android os with windows or a linux distro.
I don't know exactly, but some ARM distributions might work (Windows 10 ARM, Raspbian, etc.). They probably won't, but it's worth a shot. If you're talking normal disrros like Ubuntu or Windows 7 then a definite no.
You're going to want a specialized build. Ubuntu has builds for mobile phones, you just have to make sure that your phone is supported.
Couple years ago I was looking for this exact thing just for a little fun on my nexus 7. This guy explains how he does it. Alot simpler then the one he did before this one.
That uses an emulator though. I was talking about removing the original OS and putting linux or windows on it.
I retract my statement. Ubuntu has stopped development for the Ubuntu Touch version of Ubuntu. However, UBports has picked the project up, so you may still be able to do it.
Consider windows is compiled for x86 or x86_64 devices with ACPI and either BIOS or UEFI present. Android handsets are ARM without ACPI, BIOS or UEFI. Theres a few x86 android handsets, very very very rare, they still dont have proper ACPI or BIOS support. So answer? No to windows. As for linux. Android is a linux distro already.
I don't mean to nag, but he wouldn't be asking if he didn't want to dick around with his phone. And Android doesn't really resemble Linux as most people would think.