How do I check for installed software packages in Linux?

In Linux systems, you can use various commands to query installed software packages. Here are some commonly used methods:

  1. Use the dpkg command (compatible with Debian and Ubuntu systems):
  2. Show the selections made using dpkg.
  3. This command will display a list of all installed software packages.
  4. Use the yum command (applicable for CentOS and Fedora systems):
  5. show me a list of installed packages
  6. This command will display a list of all installed software packages.
  7. Use the rpm command (for Red Hat and CentOS systems):
  8. list all installed packages
  9. This command will display a list of all installed software packages.
  10. Use the apt command (for Debian and Ubuntu systems):
  11. List all installed packages.
  12. This command will display a list of all installed software packages.
  13. Execute the dnf command (for Fedora systems):
  14. Show me a list of installed packages.
  15. This command will display a list of all installed software packages.

No matter which command you use, you can save the results to a file using redirection. For example:

dpkg --get-selections > installed_packages.txt
bannerAds