Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I see unix tutorials, I see them using:


is var just a placeholder for an example?

share|improve this question

closed as not a real question by Lucas Kauffman, voretaq7 Jul 27 '12 at 18:47

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

No. /var is a directory. It tends to contains "variable" data - that is data that is going to tend to change and often not configuration files. (eg. /var/mail for mail storage, /var/vm for where virtual memory is stored)

For more information on how directories are laid out on Unix check out question 24523

share|improve this answer
in your example directory is a more appropriate term – monomyth Nov 23 '09 at 23:11
@monomyth: Thanks. Fixed. – Chealion Nov 24 '09 at 6:49

No, /var is a directory in the filesystem. One of the directories often referred to that exists under that is /var/log where most of the system and many of the application logs are kept.

"foo", "bar", "baz" and the like are placeholders.

share|improve this answer
"foo", "bar" and "baz" are traditional metasyntactic variables ( – Jason Antman Nov 23 '09 at 21:52
Or go to the source. esr is the maintainer of the Jargon File and the author of The New Hacker's Dictionary. – Dennis Williamson Nov 24 '09 at 0:06

The top-level unix directory names are largely influenced by how these systems were configured decades ago. Here's a quick run-down of the more common ones:

  • /bin/ - programs that are part of the "core" of the system, i.e. required at startup
  • /boot/ - files requried during the boot process of the system (such as the kernel)
  • /dev/ - device nodes (placeholder files representing devices such as disks)
  • /etc/ - your configuration files
  • /home/ - directories belonging to actual users
  • /lib/ - shared librararies and other files that are part of the installed programs, but not directly runnable.
  • /sbin/ - same as /bin, but should only be run by root.
  • /tmp/ - temporary files (anyone can use this directory)
  • /usr/ - files that aren't system-critical, but are part of the system.
  • /var/ - files that change, but should be retained between boots

Traditionally, /usr was actually mounted as a network filesystem once the system was operational. So /bin and /sbin (which were stored on the local machine) only contained the stuff necessary to get that remote access up and running. /usr/ in turn contains elements of the "standard" directory tree, including /usr/bin/, /usr/sbin/, /usr/lib/, /usr/etc/, etc.

In the same way, /usr/local/ contained a set of programs, files, etc., that were "local" to a given installation, i.e. not part of the standard distribution. Again, expect to see /usr/local/bin/, /usr/local/lib/, etc. On a newly installed machine, those directories should be relatively empty, and it's a pretty safe place to install your own programs without creating any conflicts with the base system.

Traditionally, /tmp/ was erased upon boot, so stuff put there shoudn't need to stick around. /var/ on the other hand, contains a more permanant storage area. Things that end up under /var/ include database files, log files, and mail boxes.

If all the packages on your system are well-behaved, you should be able to put the entire system on read-only media (such as a CD), except have /var/ (and maybe /home/) be on a writable device, and /tmp/ be a ramdrive.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.