How to do \"sudo apt-get install \" on OSX?
There isn't an equivalent out of the box.
You may want to take a look at MacPorts:
MacPorts, formerly called DarwinPorts, is a package management system that simplifies the installation of software on the Mac OS X and Darwin operating systems. It is a free/open source software project to simplify installation of other free/open source software. Similar in aim and function to Fink and the BSDs' ports collections, DarwinPorts was started in 2002 as part of the OpenDarwin project, with the involvement of a number of Apple Inc. employees including Landon Fuller, Kevin Van Vechten, and Jordan Hubbard.
http://en.wikipedia.org/wiki/MacPorts
http://www.macports.org/