[root@study ~]# rpm -qa | wc -l
[root@study ~]# yum list installed | wc -l
Example, CentOS 7 :
$ rpm -qa | wc -l 1733 $ yum list installed | wc -l 1757
wc will also count the 24 "extra yum lines" ... please check with :
$ yum list installed >> yum-list-installed.txt $ rpm -qa >> list__rpm-qa.txt
... and watch the result in the text files : Use an editor with line numbers enabled.
Note : The above commands are unprivileged user commands. No reason to use