Alternatives to rpm -qa and rpm -ql in ubuntu

I am following Linux CBT tutorials for RHEL to learn some LINUX basics.

If I want to know if a particular package is installed in ubuntu, I usually type dpkg -l and grep the needed name. Such as

dpkg -l | grep cron

Is it same as using

rpm -qa | grep cron

for Redhat based OSes?

That guy also uses rpm -ql to list the file locations. Such as

rpm -ql crontabs

Can some one tell me what exactly does rpm -ql list and how can I get a similar command in Ubuntu to list all relevant files like rpm -ql crontabs. (Right now, I use locate cron and it lists me every file)


Solution 1:

dpkg -l <packagename> gives you the status of the package

dpkg -L <packagename> gives you a list of files including their locations

see also the manpage