Updated: 2022/Sep/29

Please read Privacy Policy. It's for your privacy.

HIER(7)                Miscellaneous Information Manual                HIER(7)

     hier - layout of file systems

     An outline of the file system hierarchy.

     Naming is very important.  The UNIX System relies on filename conventions
     for much of its power as a system.  The following file system layout
     describes generally where things are and what they are, with references
     to other man pages for more detailed documentation.

     Not all files will be in every system.

     /          Root directory of the system.

                System copyright notice, most often put on CD-ROM

     /[a-z]/    User file systems.

     /altroot/  Alternate root file system, in case of disaster.

     /bin/      Utilities used in both single and multi-user environments.

     /boot*     Second-stage boot loader(s) for some platforms; see

     /cdrom/    Empty directory commonly used by system administrators as a
                temporary mount point for ISO-9660 file systems on CD (or DVD)

     /dev/      Block, character, and other special device files.

                MAKEDEV  Script for creating device files; see makedev(8).
                console  The computer's console device.
                drum     The computer's swap space device; see drum(4).
                fd/      File descriptor files; see fd(4).
                klog     Kernel logging device; see syslog(3).
                kmem     Kernel virtual memory device; see mem(4).
                log      UNIX domain datagram log socket; see syslogd(8).
                mem      Kernel physical memory device; see mem(4).
                null     The null device; see null(4).
                pts/     Mount point for the pseudo-terminal device file
                         system; see mount_ptyfs(8).
                stdout   File descriptor files; see fd(4).
                tty      Device pointing to each process's own controlling
                         terminal; see tty(4).
                zero     The zero device; see zero(4).

     /etc/      System configuration files and scripts.

                amd*           Configuration files for amd(8).
                changelist     Files backed up by the security script.
                crontab        Schedule used by the cron(8) daemon.
                csh.logout     System-wide scripts for csh(1).
                daily          Script run each day by cron(8).
                daily.conf     Configuration file for daily; see
                defaults/      Default configuration files read by various
                               /etc/*.conf files.
                disktab        Disk description file; see disktab(5).
                dm.conf        Dungeon master configuration; see dm.conf(5).
                dumpdates      Dump history; see dump(8).
                exports        File system export information; see mountd(8).
                fstab          File system mounting table; see fstab(5) and
                ftpusers       Users denied ftp(1) access; see ftpd(8).
                ftpwelcome     ftp(1) initial message; see ftpd(8).
                gettytab       Terminal configuration database; see
                group          Group permissions file; see group(5).
                hosts          Host name database backup for named(8); see
                hosts.equiv    Trusted machines with equivalent user IDs.
                hosts.lpd      Trusted machines with printing privileges.
                inetd.conf     Internet server configuration file; see
                kerberosV/     Configuration files for Kerberos version V; see
                localtime      Local time zone; see ctime(3).
                login.conf     Configuration of user classes and limits; see
                mail/          Configuration files for sendmail(1).

                               aliases*    Username alias files.
                               sendmail.*  sendmail(1) configuration
                mail.rc        System-wide initialization script for mail(1).
                man.conf       Configuration file for man(1); see man.conf(5).
                master.passwd  Main password file, readable only by root; see
                mk.conf        Optional file containing make(1) variables,
                               used to configure pkgsrc and the system
                monthly        Script run each month by cron(8).
                monthly.conf   Configuration file for monthly; see
                motd           System message of the day.
                mtree/         mtree(8) configuration files.
                namedb/        named(8) configuration files and databases.
                netgroup       Network groups; see netgroup(5).
                networks       Network name database; see networks(5).
                passwd         World readable password file generated from
                               master.passwd; see passwd(5), pwd_mkdb(8).
                phones         Remote host telephone number data base; see
                printcap       Printer configuration for lpr(1); see
                profile        System-wide scripts for sh(1).
                protocols      Protocol name database; see protocols(5).
                pwd.db         Database form of passwd file; see pwd_mkdb(8).
                rc             Master system startup script invoked by
                               init(8); see rc(8).
                rc.conf        Configuration file for system startup and
                               shutdown scripts; see rc.conf(5).
                rc.d/          Directory containing per-subsystem startup and
                               shutdown scripts; see rc(8).
                rc.local       Locally editable system startup script.
                rc.shutdown    Master system shutdown script invoked by
                               shutdown(8); see rc(8).
                remote         Remote host description file; see remote(5).
                security       Daily (in)security script run by cron(8).
                security.conf  Configuration file for security; see
                services       Service name data base; see services(5).
                shells         List of permitted shells; see shells(5).
                skel/          Sample initialization files for new user
                sliphome/      SLIP login/logout scripts; see sliplogin(8).
                spwd.db        Database form of master.passwd file; see
                syslog.conf    syslogd(8) Configuration file; see
                ttyaction      Login hooks for specific ttys, typically used
                               to chown console devices.  See ttyaction(5).
                ttys           Terminal initialization information; see
                weekly         Script run each week by cron(8).
                weekly.conf    Configuration file for weekly; see

     /home/     Default location for user home directories.

     /kern/     Mount point for the kern file system; see mount_kernfs(8).

     /lib/      Dynamic linked libraries used by dynamically linked programs
                that cannot rely upon /usr/lib/ being available, such as those
                in /bin/ and /sbin/.

     /libdata/  Non-executable files (such as device firmware) required at
                boot time, when /usr/libdata may not be available.

     /libexec/  System utilities (such as the dynamic linker) required by
                programs and libraries that cannot rely upon /usr/libexec/
                being available.

     /mnt/      Empty directory commonly used by system administrators as a
                temporary mount point.

     /net/      automounted NFS shares; see auto_master(5)

     /netbsd    Kernel executable image (the operating system loaded into
                memory at boot time).

     /proc/     Mount point for the process file system; see mount_procfs(8).

     /rescue/   Statically linked rescue tools, for use in system recovery.

     /root/     Home directory for the super-user.

                .cshrc    Super-user start-up file for csh(1).
                .login    super-user start-up file for csh(1).
                .profile  super-user start-up file for sh(1).
                .rhosts   Super-user id mapping between machines.  (Obsolete.)

     /sbin/     System programs and administration utilities used in both
                single-user and multi-user environments.

     /stand/    Programs used in a standalone environment, that is, things
                that run on bare hardware without a kernel.  Currently kernel
                modules are also placed here, although this remains somewhat
                controversial and they may yet get moved.

     /tmp/      Temporary files.  The contents of /tmp are usually not
                preserved across a system reboot.

     /usr/      Contains the majority of the system utilities and files.

                X11R7/    X11 files (for X11 revision 7).

                          bin/      X11 binaries.
                          include/  X11 include files.
                          lib/      X11 libraries.

                bin/      Common utilities, programming tools, and
                games/    The important stuff.
                include/  Standard C (and extension) include files.

                          arpa/       Include files for Internet service
                          atf/        Include files for the Automated Testing
                                      Framework; see atf(7).
                          g++/        Include files for the GNU C++ compiler.
                          machine/    Machine specific include files.
                          net/        Miscellaneous network include files.
                          netatalk/   C include files for AppleTalk protocols
                                      see atalk(4).
                          netinet/    Include files for Internet standard
                                      protocols; see inet(4).
                          netinet6/   Include files for Internet protocol
                                      version 6; see inet6(4).
                          netipsec/   Include files for secret key management,
                                      used for security protocols; see
                          nfs/        C include files for NFS (Network File
                          protocols/  C include files for Berkeley service
                          sys/        ``System-level'' C include files.
                          ufs/        C include files for several mutually
                                      related file systems.  (The `u' was
                                      originally for UNIX.)

                lib/      Archive, profiled, position independent archive, and
                          shared libraries.

                                5.3/  Lua 5.3 modules.

                libdata/  Miscellaneous utility data files.
                libexec/  System daemons & system utilities (executed by other

                mdec/     Boot blocks, etc.
                obj/      Architecture-specific target tree produced by
                          building the /usr/src tree; often a symbolic link or
                          mounted file system.
                pkg/      Installed third-party software packages.

                          bin/      Package binaries.
                          etc/      Package configuration files.
                          include/  Package include files.
                          lib/      Package libraries.
                          libdata/  Package data files.
                          libexec/  Package daemons.
                          sbin/     Package system utilities.

                pkgsrc/   Build descriptions (packaging) for the NetBSD
                          package system.

                          distfiles/  Downloaded upstream source archives.
                          packages/   Compiled binary packages.

                          There are also several other subdirectories which
                          contain packages of a certain category, e.g.,
                          archivers, graphics, ...

                sbin/     System daemons and system utilities (normally
                          executed by the super-user).
                share/    Architecture-independent files, mostly text.

                          calendar/  A variety of calendar files; see
                          dict/      Word lists; see look(1) and spell(1).

                                     words     Common words.
                                     web2      Words from Webster's Second
                                               International Dictionary.
                                     papers/   Reference databases; see
                                     special/  Custom word lists; see

                          doc/       Miscellaneous documentation.
                          games/     Data files used by various games.
                          i18n/      internationalization databases; see
                          locale/    Locale databases and gettext message
                                     catalogs; see setlocale(3) and
                          man/       Manual pages.
                          me/        Macros for use with the me(7) roff macro
                          misc/      Miscellaneous system-wide text files.

                                     terminfo      Terminal characteristics
                                                   database; see terminfo(5).
                                     terminfo.cdb  database form of terminfo
                                                   file; see tic(1).

                          mk/        Include files for make(1).
                          ms/        Macros for use with the ms(7) roff macro
                          nls/       Message catalogs; see catgets(3).
                          tmac/      Text processing macros; see nroff(1) and
                          zoneinfo/  Time zone database; see tzfile(5).
                tests/    Test programs; see tests(7) for information on how
                          to run them.

     /usr/src/  NetBSD and local source files.

                bin/       Source for utilities/files in /bin.
                common/    Sources shared between kernel and userland.
                crypto/    Cryptographic source, which may have import or
                           export restrictions.
                dist/      Third-party `virgin' source code, referenced by
                           other parts of the source tree.  (Deprecated; use
                           external/ instead.)
                distrib/   Tools and data files for making NetBSD releases and
                doc/       Documentation about the source tree (i.e., about
                           the tree, not about how to use the software in the
                etc/       Source (usually example files) for files in /etc.
                external/  Source for programs from external third parties
                           (where NetBSD is the not the primary maintainer),
                           grouped by license, and then products per license.

                           apache2/          Apache 2.0 license.
                           bsd/              BSD (or equivalent) licensed
                                             software, possibly with the
                                             "advertising clause".
                           broadcom/         Broadcom firmware license.
                           cddl/             Common Development and
                                             Distribution License (the Sun
                                             license which is based on the
                                             Mozilla Public License version
                           gpl2/             GNU Public License, version 2 (or
                           gpl3/             GNU Public License, version 3.
                           historical/       Lucent's old license.
                           ibm-public/       IBM's public license.
                           intel-fw-eula/    Intel firmware license with
                                             redistribution restricted to OEM.
                           intel-fw-public/  Intel firmware license permitting
                                             redistribution with terms similar
                                             to BSD licensed software.
                           intel-public/     Intel license permitting
                                             redistribution with terms similar
                                             to BSD licensed software.
                           lgpl3/            GNU lesser general public
                                             license, version 3.
                           mit/              MIT (X11) style license.
                           mpl/              Mozilla Public License.
                           zlib/             BSD-like zlib license.

                games/     Source for utilities/files in /usr/games.
                include/   Source for files in /usr/include.
                lib/       Source for libraries in /usr/lib.
                libexec/   Source for utilities/files in /usr/libexec.
                regress/   Various legacy regression tests.
                rescue/    Source/makefiles for /rescue.
                sbin/      Source for utilities/files in /sbin.
                share/     Source for files in /usr/share.


                                 papers/  Source for various historical
                                          technical papers (many from
                                 psd/     Source for Programmer's
                                          Supplementary Documents.
                                 smm/     Source for System Manager's Manual.
                                 usd/     Source for User's Supplementary
                sys/       Kernel source files.

                           arch/        Architecture-specific support.

                                        acorn32/       Acorn RiscPC/A7000 and
                                                       VLSI RC7500.
                                        algor/         Algorithmics Ltd. MIPS
                                                       evaluations boards.
                                        alpha/         Digital/Compaq Alpha.
                                        amd64/         Computers with x86_64
                                                       capable CPUs.
                                        amiga/         Commodore Amiga and
                                                       MacroSystem DraCo.
                                        amigappc/      PowerPC based Amiga
                                        arc/           MIPS-based machines
                                                       following the Advanced
                                                       RISC Computing spec.
                                        arm/           ARM processor general
                                        atari/         Atari TT030, Falcon and
                                        bebox/         Be Inc. BeBox.
                                        cats/          Chalice Technology's
                                                       CATS and Intel's
                                                       EBSA-285 evaluation
                                        cesfic/        CES FIC8234 VME
                                                       processor board.
                                        cobalt/        Cobalt Networks' MIPS-
                                                       based Microserver.
                                        dreamcast/     Sega Dreamcast game
                                        emips/         Machines based on
                                                       Extensible MIPS.
                                        evbarm/        ARM based evaluation
                                        evbmips/       MIPS based evaluation
                                        evbppc/        PowerPC based
                                                       evaluation boards and
                                        evbsh3/        SH3/SH4 based
                                                       evaluation boards.
                                        ews4800mips/   NEC's MIPS based
                                                       EWS4800 workstations.
                                        hp300/         Hewlett-Packard
                                                       9000/300 and 400
                                        hppa/          Hewlett-Packard
                                                       9000/700 and 9000/800
                                                       HPPA based
                                        hpcarm/        StrongARM based WinCE
                                                       PDA machines.
                                        hpcmips/       MIPS based WinCE PDA
                                        hpcsh/         Hitachi SH3/4 based
                                                       WinCE PDA machines.
                                        hppa/          HPPA processor general
                                        i386/          32-bit 80x86-based IBM
                                                       PCs and clones.
                                        ibmnws/        IBM Network Station
                                        iyonix/        Castle Technology's
                                                       Iyonix ARM based PCs.
                                        luna68k/       Omron Tateishi
                                                       Electric's 680x0-based
                                                       LUNA workstations.
                                        m68k/          680x0 processor general
                                        mac68k/        Apple Macintosh with
                                                       68k CPU.
                                        macppc/        Apple Power Macintosh
                                                       and clones.
                                        mips/          MIPS processor general
                                        mipsco/        MIPS Computer Systems
                                                       Inc. family of
                                                       workstations and
                                        mmeye/         Brains Inc. SH3 based
                                                       mmEye multimedia
                                        mvme68k/       Motorola MVME
                                                       680x0-based SBCs.
                                        mvmeppc/       Motorola PowerPC VME
                                        netwinder/     StrongARM based
                                                       NetWinder machines.
                                        news68k/       Sony's 680x0-based NEWS
                                        newsmips/      Sony's MIPS-based NEWS
                                        next68k/       NeXT 68k "black"
                                        ofppc/         Open Firmware PowerPC
                                        playstation2/  SONY PlayStation 2.
                                        pmax/          Digital MIPS-based
                                                       DECstations and
                                        powerpc/       PowerPC processor
                                                       general support.
                                        prep/          PReP (PowerPC Reference
                                                       Platform) and CHRP
                                                       (Common Hardware
                                                       Reference Platform)
                                        sandpoint/     Motorola Sandpoint
                                                       reference platform.
                                        sbmips/        Broadcom/SiByte
                                                       evaluation boards.
                                        sgimips/       Silicon Graphics' MIPS-
                                                       based workstations.
                                        sh3/           SH3/SH4 processor
                                                       general support.
                                        shark/         Digital DNARD
                                        sparc/         Sun Microsystems SPARC
                                                       (32-bit) and UltraSPARC
                                                       (in 32-bit mode).
                                        sparc64/       Sun Microsystems
                                                       UltraSPARC (in native
                                                       64-bit mode).
                                        sun2/          Sun Microsystems
                                                       68010-based Sun 2
                                        sun3/          Sun Microsystems
                                                       68020/68030-based Sun
                                                       3/3x architecture.
                                        sun68k/        680x0-based Sun
                                                       architecture general
                                        vax/           Digital VAX.
                                        x68k/          Sharp X680x0
                                        x86/           General support for
                                                       PC/AT compatibles with
                                                       ia32 or x86_64 CPUs.
                                        xen/           The Xen virtual machine
                                        zaurus/        Sharp C3x00 Arm based

                           compat/      Kernel compatibility modules

                                        common/    Common compatibility
                                                   routines, old 4BSD and
                                                   NetBSD routines.
                                        freebsd/   Support for FreeBSD
                                                   binaries; see
                                        hpux/      Support for 68000 HP-UX
                                        linux/     Support for Linux binaries;
                                                   see compat_linux(8).
                                        m68k4k/    Support for 4KB page 68000
                                        netbsd32/  Support for NetBSD 32-bit
                                                   binaries on 64 bit
                                                   platforms with compatible
                                                   CPU families.
                                        ossaudio/  Support for OSS audio.
                                        sunos/     Support for SunOS 4.x
                                                   binaries; see
                                        ultrix/    Support for ULTRIX
                                        vax1k/     Support for older VAX
                                                   binaries that started on a
                                                   1 KB boundary.

                           conf/        Architecture independent configuration
                           crypto/      Cryptographic kernel source, which may
                                        have import or export restrictions.
                           ddb/         In-kernel debugger.
                           dev/         Architecture independent device
                           fs/          File systems.  See also ufs/ and
                                        adosfs/      AmigaDOS file-system
                                                     support; see
                                        cd9660/      Support for the ISO-9660
                                                     file system; see
                                        filecorefs/  Support for the Acorn
                                                     RISC OS filecore file
                                                     system; see
                                        msdosfs/     MS-DOS file system; see
                                        ntfs/        NTFS file system support;
                                                     see mount_ntfs(8).
                                        ptyfs/       Pseudo-terminal device
                                                     file system; see
                                        union/       Union file system; see
                           gdbscripts/  Support for accessing kernel
                                        structures from within the debugger

                           kern/        Primary kernel source code.
                           lib/         Libraries supporting the kernel.

                                        libkern/  C library routines used in
                                                  the kernel.
                                        libsa/    Machine-independent
                                                  standalone library, used by
                                                  boot loaders.
                                        libz/     Compression library.

                           miscfs/      More file systems.

                                        deadfs/  Kernel only dead file system.
                                        fdesc/   File descriptor file system;
                                                 see mount_fdesc(8).
                                        fifofs/  POSIX FIFO (named pipe)
                                        genfs/   Generic file system code that
                                                 supports other file systems.
                                        kernfs/  Kernel namespace file system;
                                                 see mount_kernfs(8).
                                        nullfs/  Loop back file system; see
                                                 Overlay file system; see
                                        procfs/  Process file system; see
                                        specfs/  Support for block and
                                                 character special files.
                                        syncfs/  Kernel trickle sync
                                        umapfs/  User and group re-mapping
                                                 file system; see

                           net/         Miscellaneous networking support.
                           netatalk/    AppleTalk networking support.
                           netinet/     IP networking support.
                           netinet6/    IPv6 networking support.
                           netipsec/    Key database for IPsec networking
                           nfs/         NFS (network file system) support,
                                        both client and server.
                           stand/       Kernel standalone support.
                           sys/         Kernel (and system) include files.
                           ufs/         Still more file systems.

                                              A FFS-based file system for use
                                              on raw flash.
                                              The Linux ext2 file system.
                                        ffs/  The Berkeley Fast File System.
                                        lfs/  The Berkeley log-structured file
                                        mfs/  The in-memory file system.
                                        ufs/  Shared UNIX file system support.
                           uvm/         UVM virtual memory system.
                tests/     Source for test programs in /usr/tests.
                usr.bin/   Source for utilities/files in /usr/bin.
                usr.sbin/  Source for utilities/files in /usr/sbin.

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

                account/   System accounting files.

                           acct  Execution accounting file; see acct(5).

                at/        Timed command scheduling files; see at(1).
                backups/   Miscellaneous backup files, largely of files found
                           in /etc.
                chroot/    Home directories of applications which are run in a
                           chroot(8) "cage".
                crash/     System (kernel) crash dumps; see savecore(8).
                cron/      Scheduled commands configuration files; see cron(8)
                           and crontab(5).
                db/        Miscellaneous automatically generated system-
                           specific database files, and persistent files used
                           in the maintenance of third party software.

                           pkg          Default location for metadata related
                                        to third party software packages.  See
                                        pkg_add(1) for more details of the
                                        NetBSD Packages Collection, or pkgsrc.

                games/     Miscellaneous game status, log, and high score
                heimdal/   Kerberos 5 KDC database; see kdc(8).
                log/       Miscellaneous system log files.

                           amd.*        amd(8) logs.
                           daily.out    Output of the last run of the
                                        /etc/daily script.
                           ftp.*        ftp(1) logs.
                           kerberos.*   kerberos(8) logs.
                           lastlog      System last-time-logged-in database;
                                        see utmp(5).
                           lpd-errs.*   Printer daemon error logs; see lpd(8).
                           maillog.*    sendmail(1) and postfix(1) (and other
                                        mail-related) log files.
                           messages.*   General system information log.
                           monthly.out  Output of the last run of the
                                        /etc/monthly script.
                           secure       Sensitive security information log.
                           sendmail.st  sendmail(1) statistics.
                           timed.*      timed(8) logs.
                           weekly.out   Output of the last run of the
                                        /etc/weekly script.
                           wtmp         Login and logout log; see utmp(5).
                           wtmpx        Another login and logout log; see

                mail/      User e-mail inboxes.
                msgs/      System messages; see msgs(1).
                preserve/  Temporary home of files preserved after an
                           accidental death of ex(1) or vi(1).
                quotas/    File system quota information.  (Legacy.)
                run/       System information files, rebuilt after each

                                 A dump from dmesg(8) taken at boot time.
                           utmp  Database of currently logged in users; see
                                 Another database of currently logged in
                                 users; see utmpx(5).

                rwho/      Rwho data files; see rwhod(8), rwho(1), and
                spool/     Miscellaneous printer and mail system spooling

                           ftp/      Commonly "~ftp", the anonymous ftp root
                                     directory; see ftpd(8).
                           mqueue/   Sendmail mail queue; see sendmail(1).
                           news/     Network news archival and spooling
                           output/   Printer spooling directories.
                           postfix/  Postfix mail queue; see postfix(1).

                tmp/       Temporary files that are not discarded between
                           system reboots.

                           vi.recover/  Recovery directory for new (current)

                yp/        Databases and configuration for the NIS (YP)
                           system; see nis(8).

     apropos(1), ls(1), whatis(1), whereis(1), which(1), paths(3)

     A hier manual page appeared in Version 7 AT&T UNIX.

NetBSD 9.99                      May 12, 2020                      NetBSD 9.99