default_type(5)
π default_type(5) β the SELinux default type config file π
okay bestie, so this is a section 5 page (that's file formats, iykyk) from the SELinux configuration corner of the manual, and the file it's about is literally called default_type. no cap, it's a whole little config file that tells SELinux which type to grab when nobody said which one. π
β¨ NAME β¨
default_type β the SELinux default type configuration file πΈ
π¦ DESCRIPTION π¦
so the default_type file is just a little list of entries, and its whole job is letting SELinux-aware applications β like newrole(1), hi bestie β pick a default type for a role when nobody actually supplied one. it's giving "backup plan but make it policy". π
selinux_default_type_path(3) is the one that'll hand you the active policy path to this file. and the default, default type file (yes, that many defaults) lives at:
/etc/selinux/{SELINUXTYPE}/contexts/default_type
where {SELINUXTYPE} is literally the entry pulled from the selinux configuration file config (peep selinux_config(5) for that whole situation π).
and then get_default_type(3) reads this file to figure out a type for the active policy. that's the whole vibe. π
π FILE FORMAT π
every single line inside the default_type file is formatted with role:type entries, where:
roleβ the SELinux role. periodt.typeβ the domain type that gets returned for this role. β¨
π EXAMPLE π
# ./contexts/default_type
auditadm_r:auditadm_t
user_r:user_t
slay. two lines, two roles, done. π
β SEE ALSO β
π«Ά reminder bestie:{SELINUXTYPE}isn't a real directory name, it's a placeholder β swap in whatever yourconfigfile says. don't go typing braces into your filesystem, I'm begging π
and that's the page!! written by Security Enhanced Linux, dated 28-Nov-2011, and it's page default_type(5) ofc. mwah, go configure responsibly πβ¨π
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-utils 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-utils 3.6-5.el9 Β· Public Domain
- debian bookworm: selinux-utils 3.4-1+b6
- debian trixie: selinux-utils 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-utils 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: selinux-utils 3.3-1build2
- ubuntu noble: selinux-utils 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: selinux-utils 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: selinux-utils 3.8.1-1build1
- ubuntu resolute: selinux-utils 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: selinux-utils 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms