gmt command not found

In this troubleshooting guide we learn how to fix gmt command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

gmt: command not found

or when using sudo you get the following error message

sudo: gmt: command not found

Solutions to gmt: command not found

How To Fix gmt: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu gmt is provided by gmt package.

gmt is:

GMT is a collection of tools that allow users to manipulate (x,y) and (x,y,z) data sets (including filtering, trend fitting, gridding, projecting, etc.) and produce Encapsulated PostScript File (EPS) illustrations ranging from simple x-y plots through contour maps to artificially illuminated surfaces and 3-D perspective views in black and white, gray tone, hachure patterns, and 24-bit color.

GMT supports many common map projections plus linear, log, and power scaling, and comes with support data such as coastlines, rivers, and political boundaries.

To fix this problem, we can install more using the command below.

sudo apt-get -y install gmt

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install gmt.

sudo apt -y install gmt

Or if you have aptitude installed you can use the following command.

sudo aptitude install gmt

Summary

In this tutorial we learn how to fix gmt command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.