If you don't care about running an older OS on a potato like that, then you can get away with an older version of Windows. The best Windows will be based on the age of the machine due to drivers and other stuff, for this case I imagine it would be most likely 7, but maybe XP. If the machine had 4gb of ram, I would have recommended trying out 10, but no way if you only have 2. Both 7 and XP are decent enough versions of Windows that can be trimmed down to very minimal systems, if its not good enough out of the box.
I won't talk about Linux here but I will note that if you want a more up to date OS on that device, its your only choice.