how to find out the apache version installed in ubuntu?

Open the terminal and type:

apache2 -v   

-v Print the version of apache2, and then exit.


From the terminal you can enter

apachectl -v

or to get even more compile info on Apache enter

apachectl -V

of course as mention by @karel you can also use apache2 instead of apachectl... just giving an alternative. This worked for me in Ubuntu 18.04 and I'm using Apache 2.4.37.