I'm not sure that I would recommend replacing them; however, you can install them to a different path and utilize them that way. Overall, if you are coming from Linux and would like access to more "generic" *nix utilities, and a system similar to apt, then I would recommend looking into Macports:http://www.macports.org
It allows, for example, using the latest "generic" GCC, as opposed to/in addition to Apple's included GCC, just as an example.