Lightweight security tool that runs programs in a restricted Linux environment using namespaces, seccomp-bpf, and capabilities. Prefix commands with firejail to start a sandbox.
Overview
Firejail is a lightweight security tool meant to protect a Linux system by running potentially untrusted applications inside a restricted environment. It is an SUID sandbox program that lowers breach risk with Linux namespaces, seccomp-bpf, and Linux capabilities, giving a process and its children a private view of shared kernel resources such as the network stack, process table, and mount table.
It can sandbox servers, graphical applications, and user login sessions. Pre-made security profiles ship for many common programs, including Mozilla Firefox, Chromium, VLC, and Transmission. Firejail works alongside SELinux or AppArmor and integrates with Linux control groups. The implementation is in C with very few dependencies and runs on Linux systems with a 3.x kernel or newer.
Day-to-day use is meant to stay simple: there are no background daemons, and security features rely on the kernel. Most command-line options can be expressed in profile files stored under the installed etc/firejail layout. Desktop integration commands connect Firejail to launchers so supported programs can start sandboxed from menus and file managers.
Related projects mentioned on the project site include Firetools, a Qt5 graphical interface for launching and managing sandboxes, and FDNS, a DNS-over-HTTPS proxy subproject.
Key features
- Linux namespaces isolation
- seccomp-bpf filtering
- Bundled profiles for common apps
- SELinux and AppArmor compatibility
- Control group integration
- Profile files for sandbox options
- Desktop launcher integration
- CLI prefix invocation
Use cases
- Sandboxing Firefox or Chromium on Linux
- Running untrusted binaries with restrictions
- Isolating BitTorrent or media clients
- Starting nginx inside a sandbox
- Hardening desktop application launches