diff --git a/src/rhcsa.md b/src/rhcsa.md index 3b717d4..f5e2582 100644 --- a/src/rhcsa.md +++ b/src/rhcsa.md @@ -653,4 +653,27 @@ sudo semanage boolean -l -C # List all SELinux booleans sudo sealert -a /var/log/audit/audit.log # Display the SELinux alerts journalctl | grep -i sealert # Display the SELinux alerts +``` + +## Manage Packages on RHEL + +### rpm +```bash +rpm -q httpd # Display the installed packages +rpm -qa # Display all installed packages + +rpm -qf /bin/bash # Display the package that installed the /bin/bash command +rpm -ql httpd # Display the files installed by the httpd package +rpm -ql coreutils | grep bin # Display the files installed by the coreutils package + +sudo rpm -i httpd-2.4.37-1.el8.x86_64.rpm # Install the httpd package + +sudo rpm -e httpd # Remove the httpd package +``` + +### rpm2cpio +```bash +rpm2cpio httpd-2.4.37-1.el8.x86_64.rpm | cpio -tv # Display the contents of the httpd package + +rpm2cpio httpd-2.4.37-1.el8.x86_64.rpm | cpio -idmv # Extract the contents of the httpd package ``` \ No newline at end of file