Homebrew is a command-line package manager for Mac that gives the users similar advantages of using "pacman" in Arch-Linux or "apt-get" in Ubuntu or "yum" in Redhat Linux. Installing homebrew in mac is easy:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Now you can use the simple
brew install package command to install the available packages in Mac in a single command.
Homebrew-Cask is another fantastic tool that provides the mac users with the flexibility to install some GUI applications from terminal. Installing is easy:
brew tap caskroom/cask brew install brew-cask
Now to install GUI application e.g. google-chrome, you can simply use
brew cask install google-chrome from command line. You do not need any drag and drop for such installation.
brew tap homebrew/science brew install R
brew install Caskroom/cask/rstudio
Installing MacTex (Latex for Mac):
brew tap caskroom/cask brew install brew-cask brew cask install mactex