Previous Page | Next Page

  1. Introduction
  2. About Linux
  3. Installation and getting started
  4. Logging in and out
  5. Basic Linux Commands
  6. Linux Files and File Permissions
  7. Linux Directory Structure
  8. Finding Files
  9. Linux Help
  10. Setting Time
  11. Devices
  12. Tips
  13. Accessing Other Filesystems
  14. Accessing Removable Media
  15. Making and Managing Filesystems
  16. Emergency Filesystems and Procedures
  17. LILO and Runlevels
  18. Init
  19. Environment, Shell Selection, and Startu
  20. Linux Kernel
  21. Package Installation and Printing
  22. Configuration, Logging and CRON
  23. Keys and Terminal Configuration
  24. Sound Configuration
  25. Managing Users
  26. Passwords
  27. Process Control
  28. Configuration and Diagnostic Tools
  29. Overall Configuration
  30. Using PAM
  31. Basic Network Setup
  32. Tools and Terms
  33. Novell and Printing
  34. Inetd Services
  35. Xinetd Services
  36. Other Network Services
  37. FTP and Telnet
  38. Samba
  39. Identd (auth)
  40. X Configuration
  41. X Use
  42. Using X Remotely
  43. X Documentation
  44. DNS
  45. DHCP and BOOTP
  46. Apache
  47. NFS
  48. PPP
  49. Mail
  50. Routing
  51. IP Masquerading
  52. Proxy Servers and ipchains
  53. UUCP
  54. News
  55. NIS
  56. Network Security
  57. Secure Shell
  58. Text Processing
  59. Shell Programming
  60. Emacs
  61. VI
  62. Recommended Reading
  63. Credits

Linux Directory Structure

Note: Files are grouped according to purpose. Ex: commands, data files, documentation.

Parts of a Unix directory tree. See the FSSTND standard (Filesystem standard)

/			Root
|---root		The home directory for the root user
|---home		Contains the user's home directories
|    |----ftp		Users include many services as listed here
|    |----httpd
|    |----samba
|    |----user1
|    |----user2
|---bin			Commands needed during bootup that might be needed by normal users
|---sbin		Like bin but commands are not intended for normal users.  Commands run by LINUX.
|---proc		This filesystem is not on a disk.  Exists in the kernels imagination (virtual).  This directory
|    |			Holds information about kernel parameters and system configuration.
|    |----1		A directory with info about process number 1.  Each process
|				has a directory below proc.  
|---usr			Contains all commands, libraries, man pages, games and static files for normal
|    |			operation.
|    |----bin		Almost all user commands.  some commands are in /bin or /usr/local/bin.
|    |----sbin		System admin commands not needed on the root filesystem.  e.g., most server 
|    |			programs.
|    |----include	Header files for the C programming language.  Should be below /user/lib for
|    |			consistency.
|    |----lib		Unchanging data files for programs and subsystems
|    |----local		The place for locally installed software and other files.
|    |----man		Manual pages
|    |----info		Info documents
|    |----doc		Documentation for various packages
|    |----tmp
|    |----X11R6		The X windows system files.  There is a directory similar to usr below this 
|    |			directory.
|    |----X386		Like X11R6 but for X11 release 5
|---boot		Files used by the bootstrap loader, LILO.  Kernel images are often kept here.
|---lib			Shared libraries needed by the programs on the root filesystem
|    |----modules 	Loadable kernel modules, especially those needed to boot the system after
|			 disasters.
|---dev			Device files for devices such as disk drives, serial ports, etc.
|---etc			Configuration files specific to the machine.
|    |----skel		When a home directory is created it is initialized with files from this directory
|    |----sysconfig 	Files that configure the linux system for networking, keyboard, time, and more.
|---var			Contains files that change for mail, news, printers log files, man pages, temp files
|    |----file
|    |----lib		Files that change while the system is running normally
|    |----local		Variable data for programs installed in /usr/local.
|    |----lock		Lock files.  Used by a program to indicate it is using a particular device or file
|    |----log		Log files from programs such as login and syslog which logs all logins,
|    |			logouts, and other system messages.
|    |----run		Files that contain information about the system that is valid until the system is
|    |			next booted
|    |----spool		Directories for mail, printer spools, news and other spooled work.
|    |----tmp		Temporary files that are large or need to exist for longer than they should in
|    |			/tmp.
|    |----catman	A cache for man pages that are formatted on demand
|---mnt			Mount points for temporary mounts by the system administrator.
|---tmp			Temporary files.  Programs running after bootup should use /var/tmp.