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:
- Use the dpkg command (compatible with Debian and Ubuntu systems):
- Show the selections made using dpkg.
- This command will display a list of all installed software packages.
- Use the yum command (applicable for CentOS and Fedora systems):
- show me a list of installed packages
- This command will display a list of all installed software packages.
- Use the rpm command (for Red Hat and CentOS systems):
- list all installed packages
- This command will display a list of all installed software packages.
- Use the apt command (for Debian and Ubuntu systems):
- List all installed packages.
- This command will display a list of all installed software packages.
- Execute the dnf command (for Fedora systems):
- Show me a list of installed packages.
- 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