Command used to check if a particular software is installed in Ubuntu or not

$ dpkg-query -s firefox

This is the equivalent of “rpm -qa firefox” in RedHat/CentOS