If you work in modern computing, you’ve probably heard of Linux. Linux was created in 1991, but its only been in the last five years that Linux has gained the recognition it deserves, and has been developed enough to become a full, multimedia, multi-networked, multi-user operating system.
But what is Linux? Before going any further into understand what Linux does, it’s worth making sure you know what Linux is, and is not. Linux is a kernel. That’s it. The kernel is the most vital part of any operating system. It interacts with the hardware, determines how the system manages files, network connections and video output. It makes all the decisions as to how the machine operates, and on top of the kernel - the applications sit.
The kernel isn’t the only part of an Operating system. It requires many applications and extensions to make a fully usable operating system. Linux is just a part of a bigger system, which technically should be known as GNU/Linux. That’s because all the extra parts which make an operating system such as libraries, graphical user interfaces and support applications have been created by Richard Stallman’s project known as the GNU Project.
NoteThe operating system model described above applies to any operating system, including Microsoft Windows. However because the entire operating system (including the kernel) has been developed by Microsoft, it’s all very similar and interlinked. Windows still has a kernel (believe it or not!), it’s located in the ‘kernel32.dll’ library and other system files in the ‘system32’ folder.
So now we know that the term ‘Linux’ actually refers to just the kernel, however it’s very commonly known as an entire operating system\distribution (Ubuntu, Debian, Redhat, openSUSE etc). This has just stuck in our society, much to the grumbles of GNU supporters. To be on the safe side, anytime you wish to refer to a Linux operating system\distribution correctly without making a scene, simply use GNU/Linux (it also references all the hard work the Free Software Foundation have put into Linux).
Linux is a strange one when it comes to distribution. Apart from being completely free, it comes in many shapes and forms, different names, paid for boxes or free CD\DVD downloads. It’s all very confusing for new users of Linux, but luckily it all makes sense when explained!
First of, Linux is completely free due to the foundations on which the GNU Project and Free Software Foundation started. It’s a quality product, used extensively throughout the world to perform extremely mission critical tasks – in fact, some of the larger companies in the world depend on it’s power purely because Windows cannot keep up.
Secondly, because Linux is just a kernel (if you’ve been keeping up you’ll know that!), it isn’t much use on its own. You will most likely want to have a graphical interface, some sort of text\image editors and a login screen, all those tools you take for granted. Linux never provided these; they were again a gift from the GNU Project, so really a complete Linux system is a collection of the Linux kernel, and these extra tools which make it usable – hence being called a ‘distribution’.
Thirdly, Linux is free to distribute – but that doesn’t mean you have to give it away. Many companies such as Redhat and Novell have gotten rich on selling their very own distributions of Linux. The appeal is often in the form of support, convenience of being on CD\DVD, product manuals and custom software designed and packaged with GNU/Linux. Of course you can still give it away if you wish, and many organizations do (Debian, Ubuntu etc).
So to recap, Linux is a kernel. A Linux operating system is technically called GNU/Linux – because GNU also helped make many of the critical programs which make it usable, and although it’s free, it can cost money thanks to the extra benefits that come with certain distributions. Lastly, a distribution is simply a custom collection of the Linux kernel, a handful of GNU tools and libraries, and any extra applications the distribution developer has decided to add.
How it all began
Linux was created by Linus Torvalds. In a newsgroup in August 1991, he wrote:
“I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu) for 386(486) AT clones.”
Little did he know at the time that companies such as Redhat and IBM would be gunning for it to be on every desktop machine they could get their hands on, and only recently has it become an operating system which can offer the home user everything they expect.
So Linux started out free, however it couldn’t do much. It was a basic shell (Similar to a DOS prompt), supporting only the basic of commands. Over the coming years, Linus and a group of Operating System enthusiasts developed it into a more fully featured system, supporting multiple users, and other various systems which all helped it grow in popularity.
Linus based his Linux design on an Operating System called
minix is an Operating System created by Andy Tanenbaum, a professor of Operating System studies and Computer Science at Vrije Universiteit in Amsterdam, Netherlands. He openly expressed his lack of support for Linux via a newsgroup which saw Torvalds and Tanenbaum battle out the pro’s and con’s of each Operating System. Many believe Linux made it big because of its freedom to be distributed, whereas
minix was license based, however there are those that believe Andy’s arrogance and lack of support towards Linus’ invention caused many to loose interest, even though
minix was a microkernel based kernel as opposed to Linux which was monolithic. Nevertheless, Linux is here to stay.
So why use Linux?
The most common question that users ask is of course, ‘Why use Linux?’. In all honesty, Windows is still the preferred operating system for 90% of the planet, purely because almost all software is written for it. There are many arguments each side that persuade system administrators and IT manager’s to switch, but in all honesty, Linux is not an Operating System that needs to sell itself. After all, it was never about the money. But if you are tired of the same problems in Windows, or just fancy seeing an entirely different side to modern computing, then Linux is for you. Granted to will need to re-learn IT again, it’s worth the trouble.
Linux has literary thousands of software packages available for it, and Linux is at a big disadvantage, due to the terms of its use (the GNU), all applications must provide their source code if requested. Individuals do not have a problem with this, hence why most software for Linux is written by enthusiasts, however larger companies see their software as assets, allowing the code to enter the public domain effectively will make it loose value, something IT vendors do not want.
This ultimately leads to many ‘unofficial packages being released. For example, people who owned ATI based graphics cards (such as IBM ThinkPad’s), could not install official ATI drivers, since ATI never released any (the source code would have to be released as well). The result was individuals having to create ‘imitation’ drivers which weren’t always as stable. This gave Linux a bad reputation in the public eye during the start of the millennium, however now that Linux is more mainstream, companies are being pressured to make their code available, and provide Linux software\drivers.
A first glance at Linux
Nowadays, Linux comes in ‘distributions’. Linux can be described as being very modular, hence why only downloading the kernel won’t be of any use to you, or just downloading a basic Linux system will only give you a bash shell. To get round this, Linux vendors such as Redhat, Novell, Ubuntu and Debian release distributions of Linux, which packages the kernel, an X system and a whole load of applications such as games, office tools, and internet applications in one installation. They can be downloaded from the vendor’s site, or brought in stores for a small fee.
The market leaders are currently Redhat (big in the United States), and Novell, (big in Europe, used to be SuSE). Both have versions of Linux that can be downloaded from their sites, however Redhat have now split their product line to include an Enterprise edition of Linux for businesses, and Fedora, a free personal distribution. All contain the same Linux kernel, but the packages that are shipped vary.
Because of the varying distributions, it’s almost impossible to explain or display images of a typical Linux system, on top of different distributions, there are many different X systems available for use with Linux, Gnome and KDE being the market leaders. They interface with the same Linux kernel, and run the same applications; however the actual layout of your desktop, the menus, windows etc will look very different.
Usually the layout is very similar to that of Windows. It has a task bar along the bottom, a menu system with all the applications split into categories, and a desktop for commonly used applications and shortcuts. Gnome and KDE has a nice little feature which allows you to have multiple desktops, meaning you can have applications open in one desktop, then simply switch to another, to display other icons and applications. Because of Linux’s modular nature, it’s very easy to install another desktop environment, making Linux capable of having many ‘faces’.
Of course, at the heart of Linux is the bash shell (a command prompt for you DOS people). In some ways, the command like is more powerful then the GUI provided by KDE or Gnome. It is certainly more powerful then DOS. The command line can be used to create, edit and delete files, compile and install applications, configure the entire Linux system, and manage user accounts. It is by far the most powerful part of Linux, and provides many built in utilities to help the user.
Since almost all of Linux is made up of configuration files and scripts (there isn’t a central registry like Windows), the bash shell is extremely good at finding data. Check out some of the advanced things the bash shell can do with regular expressions etc over at its official website: http://www.gnu.org/software/bash/.
Linux Security is like no other…
Since security is one of the most important aspects of modern IT, and getting more and more attention and investment with each year that passes, it make sense to touch briefly on the security issues of Linux.
The old argument of which is more secure, Linux or Windows is still mostly based on opinion, however Linux does have some facts in its favor, and they are listed below:
- Linux defaults to a non-privileged user account. Most tasks performed by the user will not happen with system wide access, meaning if a malicious application does run, it will perform little or no damage.
- By default, the super user account can only be used locally. Meaning that if any remote exploit takes place, it cannot be done with super user privileges.
- All the source code of Linux and all its applications are in the public domain, meaning exploits and bugs are found and fixed very quickly, and if the creator cannot issue a fix\patch, someone else can!
- Similar to the previous point, Linux simply can’t hide anything. Every task, process, file can be accounted for and explained by someone. If you don’t like it, you can simply remove parts of the system with no risk of licensing issues or breaking the usage agreement.
Personally, I think Linux is a far more secure Operating System by design. However since it only occupies about 10% of the OS market, it stands to reason that most threats will be specifically targeted towards Windows. Although this may be true, even if Linux were to be the target of attack, its design will mean there will be little effects.
Although many applications for Linux fall foul of exploits and security updates, the actual kernel is very secure, with little exploits ever being found. Almost all Windows viruses\Trojans exploit the Windows kernel, whereas the Linux kernel is by far safer.
There’s a lot that can be said on the battle of security between Windows and Linux and I think it’s been summed up best by Scott Granneman of SecurityFocus. His article can be read here.
From Windows to Linux: The biggest differences
The rest of this introduction covers the most obvious questions for someone who’s just starting out with Linux, what’s the difference? The points below focus on usability rather then the technical details behind Linux.
- Instead of all Operating system files being in one directory, they are spread across the root partition.
- Linux does not use the terms ‘C drive’, and ‘D drive’, instead everything starts at ‘/’. Even if you have more then one physical disk, it’s all seen as sub directory under the same virtual file system.
- Linux is case sensitive. The folder ‘Documents’ is different to the folder ‘documents’. Linux also uses forward slashes for referencing directories (e.g. /var/log/messages).
- Shortcuts are called symbolic links, or hard links. Hard links directly influence the target, symbolic links work just like Windows shortcuts.
- Linux cannot run Windows applications and vice-versa unless you use emulation software.
- Linux does not contain a central registry of settings; they are stored in configuration files in the folder /etc.
- You do not need to defragment Linux, due to the way the file system organizes files intelligently. Linux also has many different file system options such as EXT3, ReiserFS etc. You are not limited to a single type. Linux now also support NTFS fully.
- There are many ways to install applications in Linux. Either using a pre-packaged binary or compiling it from source code.
- Applications and files do not need file extensions.
- Storage devices need to be mounted before they can be accessed. Writing does not occur until the disk has been unmounted, so ensure you mount\unmount disks correctly.
Instead of all Operating system files being in one directory, they are spread across the root partition.
Windows has either a WINNT or WINDOWS folder in the C drive, Windows then stores all it’s configuration files and applications in that directory. Linux however contains many operating specific folders on the root of the hard disk, such as /mnt, /boot, /var and /etc meaning that any file on the computer could potentially be an Operating System file.
Linux does not use the terms ‘C drive’, and ‘D drive’, instead everything starts at ‘/’. Even if you have more then one physical disk, it’s all seen as sub directory under the same virtual file system.
Windows uses a lettering system to identify all the partitions in a computer. Linux only uses one. The ‘/’ is the root of the file system, All directories are contained under this location, for example, a folder in your home directory would have the absolute address of /home/username/my_folder. Remember, Linux uses forward slashes!
Linux is case sensitive. The folder ‘Documents’ is different to the folder ‘documents’. Linux also uses forward slashes for referencing directories (e.g. /var/log/messages).
Linux is case sensitive. This includes commands, directory names and applications. When using the shell, try to enter the directory ‘My_Folder’ with the command ‘cd my_folder’. Linux will produce a ‘No such file or directory’ error.
Shortcuts are called symbolic links, or hard links. Hard links directly influence the target, symbolic links work just like Windows shortcuts.
Symbolic links are similar to shortcuts in that they link to a specific target. However they can be used by other applications to ‘pretend’ to be the target application. They can be created in the shell using the command ‘ln’.
Linux cannot run Windows applications and vice-versa unless you use emulation software.
Linux on its own cannot understand Windows executables or DLL’s; however with the help of a package called wine, Linux can execute Windows software using emulation. Linux can however read NTFS and FAT partitions. Windows cannot execute Linux applications, nor can it read a Linux partition or any of its data without using third party applications.
Linux does not contain a central registry of settings; they are stored in configuration files in the folder /etc.
Most people are used to the Windows registry however it presents a major security bug in the sense that any user can write global operating system settings to it, Linux uses configuration text files that can only be read\written to by privileged users, the file names usually end in .conf (note that’s not a file extension, just a common ending to make the file more identifiable), and usually contain the information in a property:value context.
You do not need to defragment Linux, due to the way the file system organizes files intelligently. Linux also has many different file system options such as EXT3, ReiserFS etc. You are not limited to a single type. Linux now also support NTFS fully.
There is no need to defragment Linux. The EXT2 and EXT3 file systems are very clean in the way they organize data. Linux forces integrity checks every now and then to ensure the file system is intact.
There are many ways to install applications in Linux. Either using a pre-packaged binary or compiling it from source code.
Most software for Linux comes from the Internet and is downloadable in many forms. Depending on your distribution, there may be a method of installing pre-packaged binaries for your platform (x86, Sparc, etc). For example, Redhat has the RPM Package Manager, which allows users of the Redhat distribution to download .rpm files and install them. This works on Redhat because libraries and other dependant files are contained in standard directories. Debian has a similar system known as
dpkg, which allows users to install .deb files. If you use a more generic version of Linux, you can download the source code and compile the application yourself. This is more error prone, but allows you to customize the application to your machine. Source code downloads end in .tar.gz.
Applications and files do not need file extensions.
Linux binaries and support files do not necessarily need file extensions. Windows users are custom to .exe or .dll extensions, however Linux binaries omit this, meaning the location /usr/bin/xmms may be a file, or it may be a directory. Linux does still recognize the most commonly used extensions such as .txt, .gif, .html and .wav.
Storage devices need to be mounted before they can be accessed. Writing does not occur until the disk has been unmounted, so ensure you mount\unmount disks correctly.
All storage mediums need to be mounted before they can be accessed. The point of mounting is so that every kind of file system, weather it be on a network drive, a USB stick, or DVD disk, can be accessed under the ‘/’ directory. Mounting basically maps a device to a directory. Linux uses the /mnt directory to mount any external devices.
When a user who’s never seen Linux uses it for the first time, the first impression usually isn’t a good one. This is because the X system’s that work on the Linux kernel are still in their infancy and may not look as modern as Windows. Because an out of the box installation of Linux generally turns everything ‘on’, it tends to run slower, however a properly configured system, stripped down to its basic needs is by far more stable, and secure then a Windows machine.
Since Linux does not have a single entity behind it, information and guides can be found all over the net, as well as at the distributors websites; http://www.redhat.com, http://www.opensuse.org/, and popular sites such as http://www.linuxiso.org (lists all the currently well known distributions and what they come with). Linux software can be found at http://www.sourceforge.net and http://www.freshmeat.net.