A Beginner's Guide to LINUX - Part I

by Vivek Srivastava

If you are reading this, I will assume that you are a newbie to Linux. Now, that means that either you have bought a new computer with Linux preinstalled, or a friend of yours told you to migrate from Windows to Linux. In the second case, either you simply removed Windows and installed Linux, or created a dual-boot system (one which gives you a choice to start Linux or Windows). Whatever the case may be, you must read on further if you think yourself to be least knowledgeable about the mysterious Linux world! I'm simply saying, "Welcome to Linux".

One question that few newbies ask me is "Is Linux some form of Windows?" NO! Linux is an entire Operating System in itself. What is an Operating System? It is a set of computer programs meant to manage the hardware and software of a computer you want to run. Most of the distributions of Linux are freely available through their websites, or through CDs/DVDs. "Distributions!! What are they?" I know some of you might have had this thought. Linux is provided by many organizations, or developers. They take the Linux kernel (the core of Linux), combine it with a GUI/DE (Graphical User Interface or Desktop Environment) and other software (which is also available for free), customize and optimize the combination and make the entire combination available in the form of a Distribution, or Flavor, free of cost. This entire "free" thing is the result of hard work by many people who devote their time to make things available for us. A few famous distributions are PCLinuxOS, Ubuntu, Fedora and Debian. There are many more.

There are many Desktop Environments used by Linux Distributions. Some of them are GNOME and KDE which are large and highly customizable, or Xfce and Blockbox, which are smaller and use less resources. A few distributions offer a choice in desktop environments, while many come with a default installation of a particular desktop environment. For example PCLinuxOS comes with KDE and Ubuntu comes with GNOME.

When you boot Linux, you are, in almost all Distributions, presented with a login screen. If you installed Linux yourself, you would have chosen a root password during the installation process. Or in the other case, your vendor must have provided a root password to you. What's root? The root file system is kind of like a file drawer that all other files are in. Before discussing root, let me explain the concept of users in Linux. Linux is a multiuser system. Users can either have administrative privileges where they can do anything, or they can have the privileges of a normal user with restricted usage. Administrative users are called super users, and the built-in super user account has the username 'root'. Linux employs the concept of a home directory for each user. It is most useful for those with restricted access. It is a directory containing the files of a user over which he has total control. Other users, barring super users, cannot alter the contents of that directory, unless specifically permitted by the owner.

Once you have logged in with the correct user name and password, open the file manager to observe the file system used by Linux. If you are, or were, a Windows user, you might be totally confused by not finding your drives (C: , D: etc.). Linux uses a different structure to store files. Your hard disk is divided into partitions, or slices. Each partition has its' own file-system, or a way of storing files. File systems can be FAT, ext2, ext3, etc. Among the partitions you have is the one on which you have installed your Linux. It is called the root file system (this "root" is different from username "root"). When Linux is started, this root file system becomes the main file system of the computer (and the main directory is "/", also known as root directory). Other directories are mounted in the /mnt directory. The /bin contains binary and other executable files. The /home contains home directories of all users other than root. The /root is the home directory of root user. File permissions determine if a file is executable or not. Extension restriction is generally imposed by the application using the file.

You might have heard a few of your geek friends talking about how the real power of Unix/Linux lies in the command line. So where do you find the command line? Here comes the role of the Shell, or Terminal. The shell is a command line interface (like the old DOS) that takes command through typing. You may find the shell or terminal located in the menu of the Distribution you are using. In PCLinuxOS, go to "Menu -> System -> Terminal -> Konsole" to open a terminal shell. Here you can type commands to be executed. For example, use ls to list the content of a directory, cd to change a directory, and so on.

Now that you understand some of the basics of Linux, it is time to update Linux. Update helps us to keep the computer secure in many ways. Moreover, you may also want to install new software. That is why it is important to understand the concept of packages. Linux uses .deb, .rpm, etc. files to install new packages. These files are like installers in Windows. They contain the required binaries and source code to be installed on the system for particular software. A good website to find rpm files is rpmfind.net. The other method of updating your installation is through package manager like apt, yum etc. These package managers also have GUI front ends like Synaptic and KPackage. Many distributions use package managers which keep a database of all the installed versions of packages. Updating through package managers is the safest way to update and install software as they also take are of dependencies (packages on which your software depends). If you install without using package managers, you will have to manually take care of all the dependencies yourself, which can be a hectic task. Look on your distro's (short form of distribution's) website for help using the package manager on your distro. In PCLinuxOS, go to "Menu -> System -> Configuration -> Packaging -> Synaptic Package Manager" to open Synaptic.

All said and done, we now come to a very important topic: Text Editors. Linux has many text editors present like vim (I personally never recommend it to a newbie; only mentioning it here because of its apparent popularity in the Linux community amongst advanced users), Emacs, Gedit, Kwrite and many more. For editing office documents, making presentations etc., office suites like OpenOffice, KOffice, etc. are used.

With this, we come to the end of part I of this tutorial. We will see more of this in the next issue. Till then, explore Linux as much as possible; but avoid doing so with the root account. Make a new account for yourself with restricted usage permissions unless you want to affect your installation badly ( I remember my beginner's days, when I once had to install Linux seven times on a single day!!!).