# Ports Filesystem Layout

## Overview

Portfile authors are expected to make sure that a port, when installed conforms to specific filesystem hierarchy guidelines. These guidelines define where certain files should be installed in the MacPorts filesystem.

## MacPorts Base, ${prefix}

`/${prefix}`

  The base of the MacPorts filesystem hierarchy.

  Default: `/opt/local`

  `bin/`

    Common utilities, programming tools, and applications.

  `etc/`

    System configuration files and scripts.

  `games/`

    Useful and semi-frivolous programs.

  `include/`

    Standard C include files.

  `java/`

    Applications based on Java.

  `libexec/`

    System daemons and system utilities (executed by other programs).

  `sbin/`

    System programs and administration utilities.

  `share/`

    Architecture-independent files.

    `doc/`

      Miscellaneous documentation

    `examples/`

      Various examples for users and programmers.

    `info/`

      GNU Info hypertext system

    `locale/`

      Localization files.

    `man/`

      Manual pages.

    `misc/`

      Misc. system-wide ASCII text files.

  `var/`

    Multi-purpose log, temporary, transient and spool files.

    `db/`

      Misc. automatically generated system-specific database files.

      `mports/`

        MacPorts runtime data.

    `spool/`

      Directory containing output spool files.

    `log/`

      Misc. system log files.

    `run/`

      System information files describing various info about system since it was booted.

`/Applications/MacPorts/`

  Native Mac OS X applications.