I'm fairly new to GIS. I want to run GDAL in the command line on my Mac running MacOS Catalina. My understanding is that QGIS comes with GDAL. GDAL plugins seem to work in my installation of QGIS.

I have tried copying the console output from running GDAL plugins within QGIS to a terminal window and I get a 'command not found' error. Same deal with just typing the commands into terminal. I have successfully installed GDAL on its own via Homebrew and used it in the command line on another computer, so I am familiar with its usage.

Are there steps I've missed before I can use GDAL from the command line?

1 Answer 1


'command not found' means the command you are trying to run can not be found in any of the directories in your PATH environment variable.

You can view the list of directories being searched by doing the following:

$ echo $PATH

Each directory is separated by a :.

I think installing GDAL via Homebrew is a better solution, but if you want to add the directory provided via QGIS to your path, do the following:

$ export PATH=/Applications/QGIS3.14.app/Contents/MacOS/bin:$PATH

Then you can confirm a command is coming from the QGIS path:

$ which gdalinfo

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.