CentOS / RHEL: List All Configured Repositories

In CentOS and RHEL, you can list all configured repositories using the yum command-line tool. Here’s the command to list all the repositories: yum repolist all Explanation: The yum command is used to interact with the YUM (Yellowdog Updater, Modified) package manager, which is used to manage software packages on CentOS and RHEL systems. The … Read more

Python: Delete / Remove Files

You can use the os module in Python to delete or remove files. The os module provides the remove() function to delete a file. Here’s an example of how to delete a file in Python: import os filename = ‘file.txt’ if os.path.isfile(filename): os.remove(filename) print(f'{filename} was deleted successfully.’) else: print(f'{filename} was not found.’) Explanation: The first … Read more

RHEL / CentOS: SELinux Is Preventing /sbin/iptables-multi-1.4.7 From Read Access On The File/rawip_socket

When SELinux is preventing access to a file or resource, you can use the audit2allow command to generate a policy module that will allow the access. Here’s how you can resolve the issue of SELinux preventing /sbin/iptables-multi-1.4.7 from read access on the file/socket /rawip_socket in RHEL/CentOS: Find the SELinux denial message in the audit log: … Read more