You can install software in Linux using dnf command as below.
I have tested all commands on AlmaLinux 9.4. Make sure that you have properly configured Linux and repo files are present in /etc/yum.repos.d/ folder. It is higher version of yum command. The yum command is now soft link to dnf command.
Let us see the usage of this command.
1. Remove Old Caching Information & Stale Files :
# dnf clean all
2. Check The Active Repo Location :
# dnf repolist
3. Get List of Software Installed & Available :
# dnf list
4. Get List of Software Installed :
# dnf list installed
5. Search Some Package :
# dnf search httpd
6. Install Package :
# dnf install httpd
7. Update Package :
# dnf update httpd
8. Remove Package :
# dnf remove httpd
9. Get Information of Package :
# dnf info httpd
10. Install Multiple Package :
# dnf install php*
11. Upgrade Package :
# dnf upgrade httpd
12. Update Complete System :
# dnf update -y
13. Get History of dnf Commands :
# dnf history
14. Get List of Dependencies of Package :
# dnf deplist httpd
15. Get Group List of Packages :
# dnf grouplist
16. Install Group of Packages :
# dnf groupinstall "Server with GUI"
17. Update Group of Packages :
# dnf groupupdate "Server with GUI"
18. Remove Group of Packages :
# dnf groupremove "Server with GUI"
19. Get Information of Group :
# dnf groupinfo "Server with GUI"
20. Get dnf Shell :
# dnf shell Last metadata expiration check: 0:18:14 ago on Tue 03 Dec 2024 09:14:54 AM UTC. > quit Leaving Shell
You can search man page of dnf command to get more better options. Above information just serves the basics of this command.