Linux is a free open-source multi-user multi-threaded operating system with excellent reliability and security. It is based on Unix and in most respects is considered to work like Unix. The core part of the operating system was created by Linus Torvalds, a Finnish computer science student, in the mid-1990s. He was looking for a way to learn Unix system administration and other versions of Unix work-alikes, such as Minnix, did not suit his requirements.
Linux and the Unix-like utilities used with it are generally distributed under a licence created by Richard Stallman and the the Free Software Foundation (http://www.fsf.org) called the GNU General Public License or GPL. This license has several interesting features.
Since Linux is based on Unix, it is not surprising that its filesystem is also based on Unix. The following directories are commonly found on Linux systems and some commentary is provided about their typical content:
/usr/bin and
/usr/local/bin)./root./mnt/cdrom is
commonly used for CD-ROM filesystems. |
/proc/cpuinfo for example)./sbin/ifconfig, have limited use by ordinary users./usr/bin,
/usr/sbin, /usr/lib,
/usr/local/bin, etc. |
When a machine is first turned on, it performs a power-on self-test (POST) which checks for memory and key devices. The hardware then looks at the first boot device (CD-ROM, floppy, first hard drive) for bootable software.
If this is the first hard drive, it looks in a special sector called the Master Boot Record (MBR) for information on the way the drive is partitioned and a boot loader which tells it where bootable software may be found.
On most Linux systems, the common boot loaders are LILO (the
Linux Loader) and GRUB (the Grand Unified Boot Loader). It
is also possible to use the Windows boot loader or a 3rd party application
like SystemCommander. The boot loader allows the user to
select which operating system will be used during the boot sequence. A
default value is usually selected after a short delay if no choice is made
by the user.
After the Linux kernel is loaded (/boot/vmlinuz) the system
examines the /etc/inittab file for instructions on the run
level to be used and other key settings. There are seven run levels on
Linux systems and their definition varies from distribution to distribution.
On a Red Hat system, the following values are used:
| Run Level | Description |
|---|---|
| 0 | Halt. Shuts down system and turns off power. |
| 1 | Single User. Starts system and runs as root user. |
| 2 | Multi-user without Network File System. |
| 3 | Full Multi-user. Use this most of the time. |
| 4 | not defined |
| 5 | Full Multi-user with X-window login. |
| 6 | Reboot. Shut down system and restart. |
/etc/rc.d/init.d from /etc/rc.d/rcX.d (where X is
the run level number) are executed in alphabetical order to start or stop
(kill) server programs. The ntsysv program is helpful to
specify which programs are turned on at boot.
The final file to be processed is /etc/rc.d/rc.local which may
contain statements to be executed before a login screen is available at the
console or remote connections are permitted.
Linux commands are generally similar to or identical to Unix commands. Here are some useful ones which you may want to look at.
ls -la /etc).cd public_html).cat /etc/hosts). |
less command is better).vi-style search and
line jumps. |