7.4. Viewing SELinux Security Types

Some common commands take an additional -Z option under SELinux that displays security context information.

7.4.1. id

The id command when followed by the -Z flag will display your current SELinux role.

7.4.2. ls

The ls command will display security contexts for the listed files when passed the -Z flag.

7.4.3. ps

The ps command will display security contexts for the listed processes when passed the -Z flag.