# How to Sandbox a Linux Process with Landlock, No Root Required

DevFeed: [How to Sandbox a Linux Process with Landlock, No Root Required](<https://devfeed.tech/articles/how-to-sandbox-a-linux-process-with-landlock-no-root-required-4341.md>)

Original publisher: [Read original article](<https://www.freecodecamp.org/news/how-to-sandbox-a-linux-process-with-landlock-no-root-required/>)

Author: Chris Roy

Published: 2026-09-11T21:42:27Z

Content type: tutorial

Language: en

Sources: [freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More](<https://devfeed.tech/sources/freecodecamp-programming-tutorials-python-javascript-git-more.md>)

Topics: [Processes](<https://devfeed.tech/topics/processes.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [process](<https://devfeed.tech/tags/process.md>), [sandbox](<https://devfeed.tech/tags/sandbox.md>), [security](<https://devfeed.tech/tags/security.md>), [selinux](<https://devfeed.tech/tags/selinux.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

## AI overview

A hands-on guide to sandboxing a Linux process with Landlock without root privileges. It explains the kernel feature, prerequisites, its self-restriction model, and the system calls used to define and apply filesystem-access rules.

## Source excerpt

Here's a program restricting itself, then trying to read two files: without landlock: read /etc/hostname ok read /tmp/secret.txt ok with landlock, /etc allowed: read