en Home Linux Containers Log Rotate HowTo install Google Earth on Debian Markdown Syntax Linux Snippets Linux backround process Network Safety Restart Bash Script Git Howto UTF-8 Character List Bridge-Utils for LXC Netbeans error CalDAV and CardDAV Server Git Alias

Nix File System Hierarchy

The way it should be

  1. bin binaries
  2. cfg config files (only text files no binaries)
  3. etc etcetera files that don't fit in any other category (only text files no binaries)
  4. lib libraries for binaries such as xx.so files
  5. scr script files such as sh, bash, perl, lua (only text files no binaries)
  6. srv server, data for backround running services such as mail, web servers, vcs repos (git)
  7. sys system and distribution specific files such as devices, drivers, and kernel feature
  8. tmp temporary files, they are deleted when the system goes down.
  9. usr user read-only user data
  10. var variable data files, such as log files, mail spools etc
NIX=/opt/nix
mkdir -p $NIX
cd $NIX
mkdir -p bin cfg etc lib scr srv sys tmp usr var

Tags: linux nix


First Created: 2022-04-20 13:27:24
Last Modified: 2026-04-21 12:16