Posted:
21 Jan 07
P
A
G
E
S
E
V
E
N
O
F
N
I
N
E
|
How Linux works
Now that you know how to get Linux up and running, here is a brief introduction to how Linux works.
Boot up
When your computer first boots up, your BIOS goes through a series of checks. After that, it goes to the first sector of your boot device (usually your hard drive) and executes whatever is there. Usually, what is there is a pointer to an active partition or a boot loader like GRUB. GRUB will run and allow you to choose an OS to boot. Whatever you choose, GRUB goes to the first sector of that partition and executes what is there. In the case of Linux, it will be a second-stage boot loader. The second stage loads and initializes your kernel and an initial RAMDisk, which provides modules (similar to drivers) that the kernel needs to read your disk's file system.
Once that is all set, the kernel executes and begins loading and initializing modules, daemons (services that run in the background, like DHCP and cron) and prepares the computer for use. Once that is all done, several terminals are launched, usually six or seven of them. These 'terminals' are like different screens that all work the same computer. If you have a graphical desktop like Gnome installed, that will usually load up and be displayed on tty7 (terminal 7) and you will see the graphical login screen on your desktop. You can press Ctl+Alt+F1 to go to tty1, which should be a text login prompt. If you login here, you will see a command line. This text environment is called a “shell.” I'll give you some basic shell commands later to help you get around. Press Ctl+Alt+F7 to get back to the graphical environment.
File system
Linux can read and write most of the same file-systems that Windows can, like FAT and NTFS. However, it is much more popular to use a file-system which provides higher performance like EXT3 or XFS. EXT2 is very similar to EXT3 except that it doesn't have journaling, which is a way to recover your data if your disk is shut down unexpectedly. Rather than a file allocation table like FAT, EXT3 uses inodes to keep track of data on the disk.
Rather than using drive letters like Windows, the files are arranged in a hierarchy, starting from /, or root. To get to data on a different drive, you mount the drive in an empty folder, and then simply open the folder. It may take a little getting used to, but it is actually a very efficient and intuitive system.
Configuration
Most of the system configuration is contained in text files in the /etc directory. Each application or service will have its own text file. Inside the file is a list of parameters and the settings that each parameter is configured for. To change the settings, you simply edit the text files. It may take some time for you to learn your way around the text files, but once you get used to it you realize that it gives you very powerful control over many details of how the system works. To find out what text file a particular setting resides in, read the man page for the application or service you want to change. I'll give you a few helpful commands later.
Users and groups, passwords
In Linux, everything is based on users. Every file is owned by an individual and a group. The user you are signed in as and the groups you belong to determine what commands you are allowed to run and what files and directories you are allowed to view or modify.
The advantage of this is that multiple people can use the computer without interfering with each other. You can set up groups to allow users to share files and pick exactly which users have access to which files. You can also force many applications to run as a particular user, limiting that application's access to only the files it needs. This keeps applications from touching sensitive files they doesn't need access to if something goes wrong, and limits the amount of access that someone can get by hacking into that particular application. In a world where spyware and trojans find many ways onto computers, these are very important security measures.
Root user
There is one special user, or superuser. The user name for this account is “root”. While you are logged in as root, you are allowed to do pretty much anything you want. You can access any file and run any command. This isn't always a good thing. The root user is allowed to do things that could completely crash the system. For this reason, it is a good idea to only log in as the root user when you have a specific reason to, like installing a new program or updating configuration files. When you don't need root privileges, you should sign in as a limited user. Limited users still have access to things you need on a daily basis, like the web browser and email, but aren't allowed to make global configuration changes.
This is also a great security feature. If your account is compromised, an attacker can only do a very limited amount of damage if they cannot get root access.
X Graphical Environment
Linux was originally written as a completely text-based OS. As an alternative to Unix, used mostly for running stable, high-performance servers, the command line environment suited Linux just fine. In order to keep up with the times and expand the user-base onto the desktop, a fully-functional desktop environment was developed for Linux. The graphical desktop for Linux is designed in a modular fashion. Linux is all about choices, and the desktop is no different. You can mix and match the modules that make up the desktop almost any way you like.
The first component of the Linux graphical environment is the X server, which provides a very basic graphical environment with mouse interaction. While the X server is an independent component, it is usually combined with a desktop manager and a window manager. The desktop manager provides your task bar and icons, while the window manager provides scroll bars, maximize and minimize buttons, and other window features.
There are many desktop managers. The two most popular are Gnome and KDE, which both include an integrated window manager. Icebox is another desktop manager that takes up less memory and system resources, making it run faster. Programs are noticeably snappier in Icebox, but the desktop has less features. Beryl is a new window manager that is gaining a lot of popularity. Combined with the XGL graphic accelerator, Beryl provides some very cool graphical effects.
Next =>[Magoo's
Introduction to Linux- Page 8, Useful Linux Commands]
| Updated:
28 Jan 08
P
A
G
E
S
E
V
E
N
O
F
N
I
N
E
|