https://drive.google.com/file/d/1OQ_HzvIJP4sSHV6EEiBxKnMTDjf7RTuP/view?usp=sharing
| Command | Purpose |
|---|---|
sestatus |
Show SELinux status, mode, policy type |
id -Z |
Display current user's SELinux context |
ls -Z |
Show file/directory SELinux context |
ps -eZ |
List all processes with SELinux contexts |
seinfo |
Query SELinux policy components |
sesearch |
Search SELinux policy rules |
avcstat |
Show SELinux denial statistics |
# Count total domains in policy
seinfo -adomain -x | wc -l
# List all domains
seinfo -adomain
# Search allow rules
sesearch --allow
# Search dontaudit rules (denials that aren't logged)
sesearch --dontaudit
# Search role transitions
sesearch --role_allow -t unconfined_r
💡 Key Insight:
These tools help diagnose denials and understand policy structure without reading raw policy files.
sensitivity:category (e.g., s0:c0.c1023)| Level | Numeric | Access |
|---|---|---|
| Unclassified | s0 |
Everyone |
| Confidential | s1 |
Restricted |
| Secret | s2-s14 |
Highly restricted |
| Top Secret | s15 |
Extremely restricted |
c0 to c1023 (1024 possible categories)🔍 Context Example:
user_u:staff_r:staff_t:s2:c0.c10= Secret clearance with Finance+HR access