seinfo Command: Query SELinux Policy Under CentOS / RHEL / Linux

The seinfo command is used to query the SELinux policy information on a CentOS, RHEL, or Linux system. With seinfo, you can get information about the types, attributes, roles, and users defined in the SELinux policy.

Here are some common seinfo options and usage examples:

  1. Display a list of all SELinux types:
seinfo -t
  1. Display information about a specific type:
seinfo -t type_name
  1. Display information about a role:
seinfo -r role_name
  1. Display information about a user:
seinfo -u user_name
  1. Display the default type for files in a specific directory:
seinfo -d path

These are just a few examples of the information you can retrieve with the seinfo command. You can also use the -x option to display extended information about a specific type, role, or user.

Leave a Comment