Install cloc by entering the following commands in the terminal:
sudo apt update sudo apt install cloc
statistics utility to count lines of code
Count physical lines of source code in the given files (may be archives such as compressed tarballs or zip files) and/or recursively below the given directories. . Counts blank lines, comment lines, and physical lines of source code in many programming languages. It is written entirely in Perl, using only modules from the standard distribution.