First, install certain utilities:

sudo apt-get install libheif-examples

Second, navigate to a directory where there are HEIC files:

directory="/media/kim/Data/Photos/"
cd "$directory"

Third, run the conversion loop:

# This is a for loop that takes into account multiple variables since file name extensions can vary in type casing
for file in {*.heic,*.HEIC}; do heif-convert $file ${file/%.*/.jpg}; done

Sample output:

$ for file in *.HEIC; do heif-convert $file ${file/%.HEIC/.jpg}; done
File contains 1 images
Written to IMG_2172.jpg
File contains 1 images
Written to IMG_2173.jpg
File contains 1 images
Written to IMG_2198.jpg
File contains 1 images
Written to IMG_2201.jpg
File contains 1 images
Written to IMG_2202.jpg
File contains 1 images
Written to IMG_2203.jpg
File contains 1 images
Written to IMG_2204.jpg