If the Mac is Intel based, you can install Linux on it.
Warning: I don't know how good are they on Macs. Never owned an Apple device.
Installing Ubuntu nowadays is fairly easy, if you haven't got special needs.
The real trouble, as with any OS change, is getting used not having most of the software you are used to, even if the alternatives are better and free.