From a GNU/Linux-based OS, you can use Heimdall, an open-source alternative to Odin which is proported to match Odin feature-for-feature while also being more reliable. Otherwise, you can follow any of the many tutorials for installing a new Android ROM. I'll provide a bit more information to help you start your journey:
If you want a custom ROM like CyanogenMod or any of the dozens which are available in precompiled packages for specific devices, then you'll need to use Heimdall to flash a custom Recovery image (TWRP or ClockWorkMod Recovery). The zipped ROM images are flashable through these recovery modes.
If you want stock, Samsung Android/Touchwiz then you can use Heimdall to flash over the entire Android image from Samsung. (Google around to find the one for your model)
If you want to compile Android yourself, you'll likely want a custom Recovery image (TWRP or ClockWorkMod Recovery) and you can download the Android source code or if you want to modify existing custom ROMs, you can download their respective source and compile it yourself. You'd need to hunt down some in-depth Android compiling tutorials in order to do this, as it's not a simple process.
Note: Before flashing anything to your device, make sure that you match the model numbers!