In case you're running Ubuntu 16.04 'xenial' or higher, you can just
sudo apt-get install gdal-bin
If you're running a lower Ubuntu version, you may need the UbuntuGIS package archive first:
sudo add-apt-repository ppa:ubuntugis/ppa
sudo apt-get update
sudo apt-get install gdal-bin
That's it! Run ogr2ogr to test whether everything works; you should see ogr2ogr's help page.
Bonus: sudo apt-get install qgis to get QGIS.
For other distributions, please see instructions on the GDAL and QGIS websites.
The most convenient way to install GDAL on OS X is through the package maintained by KyngChaos.
Run ogr2ogr in a terminal to test whether everythings works.
While installing GDAL on Windows is easy, coupling it to a Bash environment requires an ugly hack.
- install GDAL (and QGIS) through the OSGeo4W installer. Choose
Express Desktop Install. This will install a bunch of geo softwares; we are interested in theOSGeo4W Shell. - install Git from https://git-scm.com/download. You now have a
Bashterminal; look forGit Bashin your machine. - the ugly hack: copy everything from
C:\OSGeo4W\bintoC:\Program Files\git\bin. Voilá: you have aBashenvironment that can executegdalcommands.
Please let us know of a better and more elegant way to do this.