Sie sind auf Seite 1von 6

Introduction To The Linux Operating System

Introduction
With Microsoft's monopoly over the operating system market, most computer users have been exposed
only to the Windows family of operating systems, which includes Windows 95, 98, NT, 2000, XP and
2003.
After using one operating system for a long time it is difficult for users to switch to a different one
because they have become used to performing tasks a certain way, so that even the slightest change in
the graphical layout or the commands makes things frustrating.
It is this mental stumbling block that makes people believe that Linux is more difficult to use than
Windows. In fact, in a recent survey, a group of people who were completely new to computers were
asked to use both Windows and Linux. At the end of the experiment the results showed that these
novice users actually found Linux easier to use and more intuitive than Windows for their daily
computing tasks.
In this topic we'll try to cover the major areas of difficulties that are faced by people who are new to the
Linux operating system. We'll show you how to do things in Linux that you do in Windows, show you
some of the features of this ‘new' operating system and drop in a few tips and tricks that will make your
life easier. We will assume that you have never used Linux but have used Windows and are familiar
with basic concepts such as files and folders, starting programs, etc.
This article aims to point you in the right direction for learning Linux and focuses on helping you stand
on your own two feet when using it rather than having to refer to a piece of paper every time you have
a problem. At the end of the day, the best way to 'learn' how to use Linux, is to actually use it and
experiment yourself rather than simply reading about it.
Play around with it, experiment, break it, fix it and everything will become clear very quickly.
So, without further delay, here is the breakdown of the topics we've covered for you:
• Section 1: Why Use Linux?
• Section 2: The Linux File System.
• Section 3: The Linux Command Line.
• Section 4: Installing Software On Linux.
• Section 5: Advanced Linux Commands.
• Section 6: Linux File & Folder Permissions.
• Section 7: Finding More Information.
We are confident that our detailed coverage will introduce this wonderful operating system to you, and
trigger your curiosity to try it out. After all, it's not a coincidence that over 60% of the Internet servers
run under Linux, while the workstation numbers within companies worldwide are constantly
increasing!
We surely hope you enjoy your journey into the world of Linux ......
Why Use Linux?
var addthis_pub = "firewallcx";
var addthis_brand = "www.Firewall.cx";
var addthis_options = 'email, digg, stumbleupon, delicious, twitter';

Introduction
The first question is - what are the benefits of using Linux instead of Windows? This is in fact a
constant debate between the Windows and Linux communities and while we won't be taking either
side, you'll discover that our points will favour the Linux operating system because they are valid :)
Of course, if you don't agree, our forums have a dedicated Linux section where we would happily
discuss it with you!
And The Reasons for using Linux ....
While we could list a billion technical reasons, we will focus on those that we believe will affect you
most:
• Linux is free. That's right - if you never knew it, the Linux operating system is free of charge. No
user or server licenses are required*! If, however, you walk into an IT shop or bookstore, you will find
various Linux distributions on the shelf available for purchase, that cost is purely to cover the
packaging and possible support available for the distribution.
* We must note that the newer 'Advanced Linux Servers', now available from companies such as
Redhat, actually charge a license fee because of the support and update services they provide for the
operating system. In our opinion, these services are rightly charged since they are aimed at businesses
that will use their operating system in critical environments where downtime and immediate support is
non-negotiable.
• Linux is developed by hundreds of thousands of people worldwide. Because of this community
development mode there are very fresh ideas going into the operating system and many more people to
find glitches and bugs in the software than any commercial company could ever afford (yes, Microsoft
included).
• Linux is rock solid and stable, unlike Windows, where just after you've typed a huge document it
suddenly crashes, making you loose all your work!
Runtime errors and crashes are quite rare on the Linux operating system due to the way its kernel is
designed and the way processes are allowed to access it. No one can guarantee that your Linux desktop
or server will not crash at all, because that would be a bit extreme, however, we can say that it happens
a lot less frequently in comparison with other operating systems such as Windows.
For the fanatics of the 'blue screen of death' - you'll be disappointed to find out there is no such thing in
the world of Linux. However, not all is lost as there have been some really good 'blue screen of death'
screen savers out for the Linux graphical X Windows system.
You could also say that evidence of the operating system's stability is the fact that it's the most widely
used operating system for running important services in public or private sectors. Worldwide statistics
show that the number of Linux web servers outweigh by far all other competitors:

Today, netcraft reports that for the month of June 2005, out of a total of 64,808,485 Web servers,
45,172,895 are powered by Apache while only 13,131,043 use Microsoft's IIS Web server!
• Linux is much more secure than Windows, there are almost no viruses for Linux and, because there
are so many people working on Linux, whenever a bug is found, a fix is provided much more quickly
than with Windows. Linux is much more difficult for hackers to break into as it has been designed from
the ground up with security in mind.
• Linux uses less system resources than Windows. You don't need the latest, fastest computer to run
Linux. In fact you can run a functional version of Linux from a floppy disk with a computer that is 5-6
years old! At this point, we can also mention that one of our lab firewalls still runs on a K6-266
-3DNow! processor with 512 MB Ram! Of course - no graphical interfaces are loaded as we only work
on in CLI mode!
• Linux has been designed to put power into the hands of the user so that you have total control of the
operating system and not the other way around. A person who knows how to use Linux has the
computer far more 'by the horns' than any Windows user ever has.
• Linux is fully compatible with all other systems. Unlike Microsoft Windows, which is at its happiest
when talking to other Microsoft products, Linux is not 'owned' by any company and thus it keeps its
compatibility with all other systems. The simplest example of this is that a Windows computer cannot
read files from a hard-disk with the Linux file system on it (ext2 & ext3), but Linux will happily read
files from a hard-disk with the Windows file system (fat, fat32 or ntfs file system), or for that matter
any other operating system.
Now that we've covered some of the benefits of using Linux, let's start actually focusing on the best
way to ease your migration from the Microsoft world to the Linux world, or in case you already have a
Linux server running - start unleashing its full potential!
The first thing we will go over is the way Linux deals with files and folders on the hard-disk as this is
completely different to the way things are done in Windows and is usually one of the challenges faced
by Linux newbies.

The Linux File System


var addthis_pub = "firewallcx";
var addthis_brand = "www.Firewall.cx";
var addthis_options = 'email, digg, stumbleupon, delicious, twitter';

Introduction
A file system is nothing more than the way the computer stores and retrieves all your files. These files
include your documents, programs, help files, games, music etc. In the Windows world we have the
concept of files and folders.
A folder (also known as a directory) is nothing more than a container for different files so that you can
organise them better. In Linux, the same concept holds true -- you have files, and you have folders in
which you organise these files.
The difference is that Windows stores files in folders according to the program they belong to (in most
cases), in other words, if you install a program in Windows, all associated files -- such as the .exe file
that you run, the help files, configuration files, data files etc. go into the same folder. So if you install
for example Winzip, all the files relating to it will go into one folder, usually c:\Program Files\Winzip.
In Linux however, files are stored based on the function they perform. In other words, all help files for
all programs will go into one folder made just for help files, all the executable (.exe) files will go into
one folder for executable programs, all programs configuration files will go into a folder meant for
configuration files.
This layout has a few significant advantages as you always know where to look for a particular file. For
example, if you want to find the configuration file for a program, you'll bound to find it in the actual
program's installation directory.
With the Windows operating system, it's highly likely the configuration file will be placed in the
installation directory or some other Windows system subfolder. In addition, registry entries is
something you won't be able to keep track of without the aid of a registry tracking program - something
that does not exist in the Linux world since there is no registry!
Of course in Linux everything is configurable to the smallest level, so if you choose to install a
program and store all its files in one folder, you can, but you will just complicate your own life and
miss out on the benefits of a file system that groups files by the function they perform rather than
arbitrarily.
Linux uses an hierarchical file system, in other words there is no concept of 'drives' like c: or d:,
everything starts from what is called the ‘/' directory (known as the root directory). This is the top most
level of the file system and all folders are placed at some level from here. This is how it looks:

As a result of files being stored according


to their function on any Linux system,
you will see many of the same folders.

These are 'standard' folders that have been


pre-designated for a particular purpose.
For example the 'bin' directory will store
all executable programs (the equivalent of
Windows ‘.exe ' files).

Remember also that in Windows you


access directories using a backslash (eg
c:\Program Files) whereas in Linux you
use a forward slash (eg: /bin ).

In other words you are telling the system


where the directory is in relation to the
root or top level folder.

So to access the cdrom directory


according to the diagram on the left you
would use the path /mnt/cdrom.

To access the home directory of user


'sahir' you would use /home/sahir.

So it's now time to read a bit about each directory function to help us get a better understanding of the
operating system:
• bin - This directory is used to store the system's executable files. Most users are able to access this
directory as it does not usually contain system critical files.
• etc - This folder stores the configuration files for the majority of services and programs run on the
machine. These configuration files are all plain text files that you can open and edit the configuration of
a program instantly. Network services such as samba (Windows networking), dhcp, http (apache web
server) and many more, rely on this directory! You should be careful with any changes you make here.
• home - This is the directory in which every user on the system has his own personal folder for his
own personal files. Think of it as similar to the 'My Documents' folder in Windows. We've created one
user on our test system by the name of 'sahir' - When Sahir logs into the system, he'll have full access to
his home directory.
• var - This directory is for any file whose contents change regularly, such as system log files - these
are stored in /var/log. Temporary files that are created are stored in the directory /var/tmp.
• usr - This is used to store any files that are common to all users on the system. For example, if you
have a collection of programs you want all users to access, you can put them in the directory /usr/bin. If
you have a lot of wallpapers you want to share, they can go in /usr/wallpaper. You can create
directories as you like.
• root - This can be confusing as we have a top level directory ‘/' which is also called ‘the root folder'.
The 'root' (/root) directory is like the 'My Documents' folder for a very special user on the system - the
system's Administrator, equivalent to Windows 'Administrator' user account.
This account has access to any file on the system and can change any setting freely. Thus it is a very
powerful account and should be used carefully. As a good practice, even if you are the system
Administrator, you should not log in using the root account unless you have to make some
configuration changes.
It is a better idea to create a 'normal' user account for your day-to-day tasks since the 'root' account is
the account for which hackers always try to get the password on Linux systems because it gives them
unlimited powers on the system. You can tell if you are logged in as the root account because your
command prompt will have a hash '#' symbol in front, while other users normally have a dollar '$'
symbol.
• mnt - We already told you that there are no concepts of 'drives' in Linux. So where do your other
hard-disks (if you have any) as well as floppy and cdrom drives show up?
Well, they have to be 'mounted' or loaded for the system to see them. This directory is a good place to
store all the 'mounted' devices. Taking a quick look at our diagram above, you can see we have
mounted a cdrom device so it is showing in the /mnt directory. You can access the files on the cdrom
by just going to this directory!
• dev - Every system has its devices, and the Linux O/S is no exeption to this! All your systems
devices such as com ports, parallel ports and other devices all exist in /dev directory as files and
directories! You'll hardly be required to deal with this directory, however you should be aware of what
it contains.
• proc - Think of the /proc directory as a deluxe version of the Windows Task Manager. The /proc
directoy holds all the information about your system's processes and resources. Here again, everything
exists as a file and directory, something that should't surprise you by now!
By examining the appropriate files, you can see how much memory is being used, how many tcp/ip
sessions are active on your system, get information about your CPU usage and much more. All
programs displaying information about your system use this directory as their source of information!
• sbin - The /sbin directory's role is that similar to the /bin directory we covered earlier, but with the
difference its only accessible by the 'root' user. Reason for this restriction as you might have already
guessed are the sensitive applications it holds, which generally are used for the system's configuration
and various other important services. Consider it an equivelant to the Windows Administration tools
folder and you'll get the idea.
Lastly, if you've used a Linux system, you'll have noticed that not many files have an extension - that
is, the three letters after the dot, as found in Windows and DOS: file1.txt , winword.exe , letter.doc.
While you can name your files with extensions, Linux doesn't really care about the 'type' of file. There
are very quick ways to instantly check the type of file anything is. You can even make just about any
file in Linux an executable or .exe file at whim!
Linux is smart enough to recognise the purpose of a file so you don't need to remember the meaning of
different extensions.
You have now covered the biggest hurdle faced by new Linux users. Once you get used to the file
system you'll find it is a very well organised system that makes storing files a very logical process.
There is a system and, as long as you follow it, you'll find most of your tasks are much simpler than
other operating system tasks.