The *nix file system is the part of the OS that manages the files and directories stored on secondary storage devices such as tape, optical and hard disks. Files and directories in the file system are stored in a hierarchical fashion(ie, a tree).
At the top level is the root directory indicated by a forward slash symbol /. "Root" is at the top of the file system hierarchy. Every file and directory on the system is stored under root and there is nothing above it in the directory tree.
Your Home Directory
Your home directory is where you have your personal files. Each user has their own home directory. You and you alone have complete control of all the files in your personal home directory.
The home directory is referenced by the '~' character. That character points to the current user's home directory. For instance, the command "cd ~" will change directory to you home directory(cd command discussed more here).
Common Directories in *nix
On a typical *nix system you will find several common directories directly under root. Some of these common directories are discussed below.
/bin
Binary images (executables) for various *nix commands used by users. These would include programs for commands such as ls, cp, mkdir and so on. In a typical distribution there will be a large number of commands files located in this directory, but only a small subset of them are technically required to be installed there.
/boot
Contains the files necessary to boot the *nix operating system. This includes the binary image of the kernel (i.e., the compiled kernel source code). In GNU/Linux The kernel file is commonly named vmlinux (uncompressed) or vmlinuz (compressed) followed by the version and release numbers. If you want to know which version of the kernel you are using, type uname -r at the shell prompt.
/dev
The device directory contains files corresponding to different I/O devices connected to the system. These would include tape drives, cdrom drives, hard disks, terminals, printers, etc. A special device is
/dev/null.
Anything written to /dev/null disappears into the ether. One of the features that made Unix popular in the early days was that all devices are treated as files, and could be accessed using file I/O commands.
/etc
This directory contains host-specific files and directories which are used primarily for system configuration purposes. Executable programs are not located here. If the X window system is installed, the files for it will be installed in a subdirectory of /etc, e.g., /etc/X11.
/home
Users' personal directories are located here. Normally each user is given a home directory where he/she may store his/her files. This is the directory where, as a user, you would spend most of your time. A typical home directory for user fredf would be /home/fredf. Note that the special symbol ~ is used to refer to the home directory in the shell.
/lib
Contains shared library images needed to boot the system and to run the commands in bin and sbin.
/mnt
Used to temporarily mount another file system under the current file system, e.g., to connect the file system for a floppy disk or a cdrom to the current file system. How these devices are mounted is not something ordinary users care about.
/opt
Third-party application programs can be installed here, each within its own subdirectory. /root This is root's home directory. The special login identifier root is the master login for the entire system. Root has privileges that other users do not have, and he or she is typically the system administrator who is responsible for administering the system, installing programs, adding users, mounting file systems, etc.
/sbin
This directory contains system binary files, i.e., executables that are normally used only by root in administering the system. Other system binaries may be found in /usr/sbin and /usr/local/sbin.
/tmp
Temporary files are often placed here.
/usr
The files and directories under usr are mounted read-only (except to root). Underneath usr are several important subdirectories.
/usr/bin
Other user-specific binaries. For example, the gcc program might be installed here.
/usr/include
Include header files for the C compiler are placed here.
/usr/lib
Contains object files and library files used in software development.
/usr/local
Another place where root can install user programs. For example, if you install the Firefox web browser, you may install it under /usr/local/firefox 20 for example. Multiple networked host systems may access the files in /usr/local.
/usr/share
Shared data files, e.g., font files, man pages, other documentation, icon images files, etc.
/usr/src
Source code, generally for reference only (i.e., not for development purposes). On many GNU/Linux systems, the Linux source code will be installed in /usr/src/linux (during installation, you usually have the choice to download and install the Linux source code).
/usr/X11
Files used by X Window (X is part of the graphical system of your Linux installation).
/var
Variable data files (i.e., data files that contain data that are changing) are stored here. These would include temporary files and log files.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment