Tutorials‎ > ‎Introduction Of Linux‎ > ‎

6.Linux Files and Folders

Linux is made with one thought in mind: Everything is a file.

A blank piece of paper is called a file in the world of computers. You can use this piece of paper to write a text or make a drawing. Your text or drawing is called information. A computer file is another way of storing your information.
If you make many drawings then you will eventually want to sort them in different piles or make some other system that allows you to easily locate a given drawing. Computers use folders to sort your files in a hieratic system.

A file is an element of data storage in a file system (file systems manual page). Files are usually stored on harddrives, cdroms and other media, but may also be information stored in RAM or links to devices.

To organize our files into a system we use folders. The lowest possible folder is root / where you will find the user homes called /home/.

/
  /home/
  /home/mom/
  /home/dad/

Behind every configurable option there is a simple human-readable text file you can hand-edit to suit your needs. These days most programs come with nice GUI (graphical user interface) like Mandrakes Control Center and Suses YAST that can smoothly guide you through most configuration. Those who choose can gain full control of their system by manually adjusting the configuration files from foo=yes to foo=no in an editor.

Almost everything you do on a computer involves one or more files stored locally or on a network.

Your filesystems lowest folder root / contains the following folders:
/bin    Essential user command binaries (for use by all users)
/boot    Static files of the boot loader, only used at system startup
/dev    Device files, links to your hardware devices like /dev/sound, /dev/input/js0 (joystick)
/etc    Host-specific system configuration
/home    User home directories. This is where you save your personal files
/lib    Essential shared libraries and kernel modules
/mnt    Mount point for a temporarily mounted filesystem like /mnt/cdrom
/opt    Add-on application software packages
/usr    /usr is the second major section of the filesystem. /usr is shareable, read-only data. That means that /usr should be shareable between various FHS-compliant hosts and must not be written to. Any information that is host-specific or varies with time is stored elsewhere.
/var    /var contains variable data files. This includes spool directories and files, administrative and logging data, and transient and temporary files.
/proc    System information stored in memory mirrored as files.

The only folder a normal user needs to use is /home/you/ - this is where you will be keeping all your documents.
  
/home/elvis/Documents
  /home/elvis/Music
  /home/elvis/Music/60s

Files are case sensitive, "myfile" and "MyFile" are two different files.