Skip to main content

Speaking UNIX, Part 11: Ramble around the UNIX file system

Popularity Report

Total Popularity Score: 0

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

Rank

Bookmark History

Saved by 25 people (-6 private), first by anonymouse user on 2007-06-29


Public Sticky notes

The core man pages for your UNIX system reside in /usr/man

Highlighted by endl3ssmuse

usually end with the suffix .conf.

Highlighted by endl3ssmuse

repository for files that typically grow in size over time.

Highlighted by endl3ssmuse

Chances are that if the file is useful but not mandatory for system operation, you'll find it in /usr.

Highlighted by endl3ssmuse

standard location to mount hard disk drive partitions and other devices

Highlighted by endl3ssmuse

/bin typically contains utilities that are essential to system operation

Highlighted by endl3ssmuse

file-manipulation commands

Highlighted by endl3ssmuse

programs found in /sbin can be executed only by superusers

Highlighted by endl3ssmuse

all the hardware installed on your system

Highlighted by endl3ssmuse

/etc directory contains configuration files for the system daemons, startup scripts, system parameters, and more

Highlighted by endl3ssmuse

All files here are vital

Highlighted by endl3ssmuse

coffer for essential system libraries.

Highlighted by endl3ssmuse

/bin is but one of many directories that contain applications and utilities. However, /bin typically contains utilities that are essential to system operation. Hence, the shells, file-manipulation commands such as cp and chmod, compression and decompression, and diagnostics reside in /bin.

/sbin also contains utilities crucial to system operation and maintenance. However, the programs found in /sbin can be executed only by superusers—hence, "superuser-bin" or /sbin.

Highlighted by diigo_llogin

/etc (often pronounced "etsee") is dedicated to system configuration. The /etc directory contains configuration files for the system daemons, startup scripts, system parameters, and more.

Highlighted by diigo_llogin

  • /usr is the umbrella for a great number of files. End-user applications—from editors, games, and interfaces, to system features—are here, as is the library of man pages along with much more. Chances are that if the file is useful but not mandatory for system operation, you'll find it in /usr.
  • /var —short for "variable"—is the repository for files that typically grow in size over time. Mailboxes, log files, printer queues, and databases can be found in /var. It's commonplace also for Web sites to be kept in /var because a Web site tends to amass data preternaturally over time.
  • Highlighted by diigo_llogin

    MANPATH="/usr/man"
    MANPATH="/usr/local/man:$MANPATH"
    MANPATH="/usr/local/mysql/man:$MANPATH
    MANPATH="$HOME/man:$MANPATH"
    export MANPATH
    

    Here, $HOME/man is searched first (it's leftmost, or first), followed by /usr/local/mysql/man, and so on. By the way, the first four commands above could be simplified to the statement:

    MANPATH="/usr/man:/usr/local/man:\
    /usr/local/mysql/man:$HOME/man"
    

    Yet, keeping the additions separate allows you to reorder the entries quickly and add new directories just as simply. Moreover, if you have a lot of paths, editing the latter MANPATH (and by extension, the PATH) variable becomes tedious.

    Highlighted by diigo_llogin

    thers use /opt or "optional," because the software isn't required to run the system. Further, some administrators dump all executables in /usr/local/bin or /opt/bin, all libraries in /usr/local/lib or /opt/lib, and so on.

    Highlighted by diigo_llogin