This article provides step-by-step instructions on installing Gmsh 4.8.x binary package on a personal computer running on Ubuntu 21.04.
The instructions given are for a Ubuntu 21.04 system, but it should also work for Ubuntu 20.04 and other Ubuntu-compatible distributions with Pop!_OS inclusive.
Preparation
1: Get the latest stable Gmsh binary package for Linux from http://gmsh.info/#Download.
Setup & Initial Configuration
Prepare a dedicated package folder for Gmsh under your HOME
directory (e.g. '~/Gmsh/').
$ cd ~/Gmsh/ (1)
1 | The prompt symbol $ indicates that you are typing at a terminal emulator (e.g. Ubuntu Terminal). |
Unzip the compressed file to the package folder:
$ tar -xvzf ~/Downloads/gmsh-4.8.4-Linux64.tgz -C ~/Gmsh/
Check the directory structure — either using Files browser or using tree
(To use the tree
command, install it by sudo apt install tree
).
$ tree ~/Gmsh/ -d -L 2
/home/hawk/Gmsh/ └── gmsh-4.8.4-Linux64 ├── bin └── share 3 directories
$ tree ~/Gmsh/gmsh-4.8.4-Linux64 -d -L 2
/home/hawk/Gmsh/gmsh-4.8.4-Linux64 ├── bin └── share ├── doc └── man 4 directories
Create a symbolic link for the Gmsh executable in the '/usr/local/bin/' folder:
$ sudo ln -s ~/Gmsh/gmsh-4.8.4-Linux64/bin/gmsh /usr/local/bin/gmsh
Double-check the installation by the accessibility:
$ which gmsh
/usr/local/bin/gmsh
You can now launch Gmsh by entering from a terminal:
$ gmsh &

Try to open a sample geometry from
. The default mouse operations are:-
Left button: rotates the viewport
-
Middle button: zooms in/out the view; the same effect using the mouse wheel
-
Right button: moves the view laterally (i.e. panning).

To exit from Gmsh, select x
).