Install COBOL on Ubuntu
Update apt
On Ubuntu you install COBOL from the system repositories. Refresh the package list first:
sudo apt update
Install gnucobol
The gnucobol package brings the compiler and the runtime:
sudo apt install gnucobol
cobc --version
Check the compiler after the install:
cobc --version
cobc (GnuCOBOL) 3.2.0
The cobc --version output on this page was produced by GnuCOBOL 3.2.0 on Alpine Linux 3.24.3 (x86_64) in a Docker container. The install steps were not run: they need Ubuntu and root.
Article author: Arthur Isaev