fakeroot is a command on several Unix systems, such as Linux, that allows a non-root user to act as root.[1]

How it works is setting the UID and GID to 0, which is effectively Superuser access to a Linux box, however you cannot access dirs like root because of how it doesn't give you actual root privileges, it just acts like you are a superuser.[2]

References

edit
  1. ^ "FakeRoot - Debian Wiki". wiki.debian.org. Retrieved 2024-11-03.
  2. ^ "What is the need for `fakeroot` command in linux". Unix & Linux Stack Exchange. Retrieved 2025-09-25.