The linux system is modelled after UNIX, though there are a lot of internal differences,
and some external differences.
All files reside within a directory tree - the tree contains data, executables and references to devices. This directory tree is based on a "root" directory which is
where all directory paths start. This "root" directory has no name - it is represented
by a "/" at the beginning of a path. Under the root directory are additional directories
/ - the root of the directory tree
/bin - where basic executables are put
/boot - where the system usually resides (this is different that unix)
/dev - where device references are put
/etc - basic system configuration files (logins, network configurations...)
/home - usually where user login "home" directories are put
/lib - contains general system libraries, or directories with more libraries..
/lib64 - systems using 64 bit processors keep 64 bit versions of libraries
/lost+found - used for filesystem recovery, and not generally useful for anything else
/media - where linux tends to mount removable devices (CD, memory sticks, cameras...)
/mnt - usually used for temporary mounts, testing things, also where disk/memory sticks may be mounted
/opt - one of the places applications may reside
/proc - a special directory tree containing internal system references (processes, active devices, dynamic kernel parameters...)
/root - the home directory for the system administrator (a login named "root")
/sbin - executables that are usually reserved for use during boot. Normally, these
binaries do not use libraries so that they may be used in a "reduced
functionality" mode to allow the administrator to recover/fix sever problems.
/selinux - used in Linux for an enhance security operation
/sys - another special directory used for internal use
/tmp - a general read/write area that is not guaranteed to hold data across boots
/usr - a directory used to hold libraries, executables, and configuration files for
applications available after the system is operational.
/var - a workspace directory used for log files, audit trails, and some applications
Each of these directories may have additional directories contained within.
The complete directory tree can be quite extensive. The directory tree is usually
divided up into "filesystems" where a filesystem contains closely related files.
A filesystem is "mounted", which means that a link is made between an existing
directory (such as /boot), and a filesystem which is outside the existing directory
tree. I choose /boot for this example because it contains all files that are necessary
to boot the linux kernel. The system is not ready for use at this time, but can be
made usable afterwards. The files within this filesystem are for the kernel, and the
initial boot of Linux. There are configuration files there and the kernel itself.
The "root" of the filesystem contains files like
(This is from my system - yours may have different files, but they should
have similar names)
The reason /boot is frequently a filesystem is that it allows for a relatively
small disk (or partition of a disk) to be used to initialize a system. It also
separates the most critical files from accidents.
The basic steps the system takes to become operational (and this is NOT
an exhaustive sequence, and the details can get complex) is not generally
that complicated -
1. the BIOS loads a program that understands filesystems - this problem
in Fedora is called "grub". This program understands several Linux file
systems, but not all. For this reason, booting linux requires a filesystem
that is known to the grub program.
2. Grub copies the linux kernel into memory (passing some basic kernel
options) and load a basic filesystem with it (the "initrd-" file associated
with the kernel). The linux kernel then creates a memory resident
filesystem, and unpacks/restores the data in the "initrd-..." file. This
filesystem is strictly temporary, as it allows for small applications in
the filesystem to examine the hardware, and initialize drivers. It also
mounts what is identified as the "root" filesystem for operational use.
3. Now that the root filesystem is mounted, the temporary memory
resident filesystem can be removed and the memory is reused for
general system memory. The boot process continues by running
the first general process - init. At this point, the system is roughly
equivalent to having turned on a printer. It is running (sort of), but is
not yet ready to do anything.
4. There are two processes actually active - 0 (the idle task) and 1 (init).
If the init process ever terminates, the idle task can/will halt the system.
This was the original way to shutdown a UNIX system - just kill the init
process. The reason this halts processing is that the init process has
several things to do -
a. start any additional processes necessary
b. "clean up" and release any resources taken by processes that
One of the things the init process does is to execute scripts that mount
additional filesystems - traditionally, /home has been a separate filesystem
to reduce possible interactions between users, and the files of the system.
Some other tasks are - loading special device drivers, starting system
daemons (such as sshd, network utility daemons) and loading security
One of the last things it does will be to start an X login utility, or start
terminal initialization utilities for console login.
When you login at a console terminal, the login utility takes your given
login name, and matches your provided password against files in
/etc (specifically, /etc/passwd, /etc/shadow). These files also define
the base for your login - what command shell you will use, where your
home directory is, and what capabilities you will be given. Once this
information is set, the login program will execute your shell (I will assume
this will be bash).
When the shell starts, it will read configuration/initialization parameters
from several places - system provided ones from /etc/profile, personal
provided ones (home directory file .bash_profile) then, and only then
will a prompt be presented.
The shell will interpret command line entry by taking the command line
entry and splitting it up into "words". The first word begins with the
first nonblank, and continuing until the first following blank/tab. This
word is used as the application name.
There are several characters that can be used to control how this word
is interpreted. If the first character starts with a "/" then it is taken as
the absolute path to the application. The application name follows the
last "/" character in the word. If there is no "/" then the word is looked
up in a list of locations to find the application. If the shell can't find one
then an error message (such as "bash: xyzzy: command not found" is
printed, and you are prompted for another command.
This list of locations can be defined by the system (the /etc/profile), or
by the users .bash_profile. The shell maintains this list in an "environment"
parameter/variable. The shell maintains two lists of such parameters, one
list is used by the current process, another list (the exported list) is passed
to applications. Don't forget, the shell itself is just an application. This
variable is named "PATH", and by default it will include the basic locations
of where applications are: /bin, /usr/bin, /usr/local/bin... there can be
a lot of entries.
You will be able to find out a lot more at
But I hope this just gets you started.