All questions
of 27What is SELinux and how does it enhance system security?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Security-Enhanced Linux (SELinux) is a mandatory access control (MAC) security mechanism implemented in the Linux kernel. Unlike traditional discretionary access control (DAC) where file owners can control access, SELinux enforces security policies defined by administrators.
Key security enhancements:
- Mandatory Access Control: Enforces rules regardless of user permissions
- Process Isolation: Restricts what processes can access based on security contexts
- Principle of Least Privilege: Grants minimal necessary permissions
- Protection against privilege escalation: Even root access is constrained by SELinux policies
SELinux uses security contexts (labels) attached to files, processes, and system resources to make access decisions based on predefined policies.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
Explain the three SELinux operational modes.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
SELinux operates in three distinct modes:
- Enforcing Mode: SELinux actively enforces security policies and denies unauthorized access attempts. Violations are logged and blocked.
- Permissive Mode: SELinux logs policy violations but doesn't enforce them. Useful for testing and policy development without breaking applications.
- Disabled Mode: SELinux is completely turned off. No policies are enforced or logged.
Commands to check and change modes:
# Check current mode
getenforce
# Change mode temporarily
setenforce 0 # Permissive
setenforce 1 # Enforcing
# Change mode permanently (edit /etc/selinux/config)
SELINUX=enforcing|permissive|disabled
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
How does AppArmor provide application security?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
AppArmor provides application security through mandatory access control using security profiles that define what resources applications can access.
Key mechanisms:
- Path-based access control: Controls access based on file paths
- Capability restrictions: Limits system capabilities processes can use
- Network access control: Restricts network operations
- Resource limitations: Controls memory, file descriptors, etc.
AppArmor profiles define:
# Example profile snippet
/usr/bin/firefox {
/home/*/** r, # Read access to user files
/tmp/** rw, # Read/write to temp
capability net_bind_service, # Network capability
deny /etc/shadow r, # Explicitly deny access
}
Applications run confined within their profiles, preventing unauthorized access even if compromised.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
Explain AppArmor profile modes.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
AppArmor profiles can operate in two modes:
- Enforce Mode: The profile actively restricts the application's access according to the defined rules. Violations are blocked and logged.
- Complain Mode: The profile logs access violations but doesn't enforce restrictions. Useful for profile development and testing.
Commands:
# Check profile status
aa-status
# Set profile to complain mode
aa-complain /path/to/program
# Set profile to enforce mode
aa-enforce /path/to/program
# Disable profile
aa-disable /path/to/program
Profile location: Profiles are stored in /etc/apparmor.d/ directory.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
The model's verdict: “”
The interactive diagram is below the answer - jump to diagram ↓
This answer is explained by a shared concept diagram - open →
How do you install and configure AppArmor profiles?
What are SELinux security contexts and their components?
What is the difference between SELinux and AppArmor?
How do you configure SELinux booleans and what are they used for?
How do you create and manage custom SELinux file contexts?
How do you troubleshoot SELinux denials?
How do you debug AppArmor profile issues?
What tools are available for SELinux monitoring and analysis?
What are AppArmor abstractions and how do you use them?
What are the security implications of running SELinux in permissive mode?
What are common AppArmor profile mistakes and how do you avoid them?
How do you create a custom SELinux policy module?
How do you create an AppArmor profile from scratch?
What are SELinux policy types and when would you create a custom type?
How do you handle SELinux performance issues?
Explain SELinux Multi-Level Security (MLS) and when it's used.
How do you implement SELinux in a containerized environment?
How do you handle SELinux in a CI/CD pipeline?
How do you plan and execute an SELinux implementation for an existing system?
How do you handle SELinux context preservation during application updates?
How do you implement SELinux for a custom web application?
How do you handle SELinux in high-availability and clustered environments?
What performance considerations should you keep in mind when deploying SELinux at scale?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Security Hardening (SELinux/AppArmor) cheatsheet
SELinux & AppArmor Interview Cheat Sheet
- Summary01
- MAC Overview02
- SELinux03
- AppArmor04
- SELinux vs AppArmor05
- Common Interview Questions06
23 of 27 Security Hardening (SELinux/AppArmor) answers are gated.
Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.
- Full answers + code
- AI explain - simpler, deeper, or visualized
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsLAMP
Linux, Apache, MySQL, PHPRuby on Rails
Convention over ConfigurationJAM
JavaScript, APIs, and MarkupServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQFastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseWeb3 / Ethereum
Solidity, Ethereum, Hardhat, FoundryDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.