Welcome to the VirtuQ Forums.

anup

Learning Linux: Why, What and How

Rating: 4 votes, 4.75 average.
My personal voyage on Linux started in 1996 when PC Quest (an Indian IT magazine) distributed a free CD containing Slackware Linux with its issue. Slackware as the reputation goes is not the easiest of the Linux distributions to install. My friend and I tried to install it several times working throughout the night but were unsuccessful. It always got stuck at the exact same point where in it needed our help, ‘mount the media’. Now coming from the Windows land, this whole mount was absolutely new to us. We had no clue what it meant. Way back in 1996, there was hardly any Internet in the country and getting any kind of help was impossible. In any case, I have come a long way since then, poking around the distribution’s documentation, the various excellent HOWTOs and other material gave me the kind of insight which availability of Google could never have. As one of my professors used to rightly say, if you learn through difficulty you learn more.

In the last decade, Linux has become a buzzword. There are many people out there who want to learn Linux and then there are many providers who are teaching Linux capitalizing on this market. However, there are very few who actually understand Linux, its philosophy and the ecosystem surrounding it. Through this blog post we attempt to classify this large ecosystem as well as make recommendations on the skills which a beginner should pick up.

What is Linux?

It is incorrect to call a Linux based operating system as Linux. Linux is just the kernel (or core) of the operating system. There are various other pieces in the operating system, which come from several open source projects, majorly the GNU project. The GNU project was started in the early 80’s by Richard Stallman to create a free UNIX like operating system. They started out by creating the various pieces (compilers, editors etc.) and were almost done with that task by the early 90’s. They were lacking the kernel, a gap which was filled by Linux created by Linus Torvalds. It is this packaging of the Linux kernel along with various other tools and utilities which most users today recognize as Linux. The correct name for such a system is actually a GNU/Linux system.

Various groups have made life easy for those attempting to install Linux. They have grouped together various utilities and pieces and packaged it nicely under the term, Linux distribution. Couple of Linux distributions are: Redhat, Slackware, CentOS, Debian, SuSe etc. There are some distributions which need not be installed, but, rather run directly from the CD (or other media), these are known as Live CD distributions. Knoppix is one of the popular Live distributions of GNU/Linux. Sometimes a Live Linux distribution is also used as a rescue disk for a Windows installation, somewhat ironical but true!

Why learn Linux?

GNU/Linux systems are extensively used in various products. Your DSL modem/router is running GNU/Linux, some of the TVs run GNU/Linux systems and thanks to android, which is based on Linux, now even the mobile devices are running it. Development environment in most of the companies is based around GNU/Linux and so is the research environment in various universities. Most of the software which you have heard about has been traditionally developed on UNIX first e.g. the C programming language, the C++ programming language, scripting languages such as PERL, Graphical User Environments (GUIs) and various others. There is a wealth of free software out there which is available for GNU/Linux and once you become familiar, you can make use of all of them. GNU/Linux is also fun. If you want to learn more about the internals of an operating system, there is no other better way to do it, then to get more insight into this fabulous operating system. Last but not the least it is a great skill to pick up from job perspective. Several companies ask for programming experience on GNU/Linux. If you have advanced knowledge of the Linux kernel, then a large number of well-paying jobs are within your reach. If you want to do app development for Android, it is always a good idea to learn GNU/Linux.

What is meant by learning Linux?

A GNU/Linux system is a UNIX system which has a history spanning several decades. As with anything that old, it is not possible to learn the whole system from end-to-end in a reasonable amount of time. Rather the correct approach is to start from the basics and then gradually build expertise over the years. Trying to pick random disjoint topics for learning does not help and it is important to build the skills in an ordered fashion much like how the typical engineering curriculum is organized.

Name:  blog post unix.jpg
Views: 3422
Size:  78.7 KB



Shown in the figure above is one possible classification of the domain of GNU/Linux systems. On the Y-axis we have increasing specialization and on the X-axis we have listed out the skills in no particular order. At the base level one starts by understanding GNU/Linux or UNIX from a user perspective i.e. learn how to do the most common set of tasks in GNU/Linux. This skill is required by almost all the technology companies as well as in universities. One may wish to enhance this information further and get some system administration level understanding of a GNU/Linux system. This can help them while working with companies providing IT support services such as CSC, Wipro etc. At times this kind of knowledge is also useful if you are managing your own machines. However, practical experience only comes from working in a large setup with several machines connected over the network. Most of the system administration skills are common across various Unices (plural for UNIX) barring a few differences.

Once you are comfortable on GNU/Linux from a user perspective, you can build skills on the core operating system kernel or Linux. Linux has several million lines of code and roughly 50% of it is device drivers (software to make new hardware work on Linux). You can start by writing some very simple device drivers or make modifications to existing device drivers. Once you have sufficient experience you can focus on writing advanced device drivers. Such work is required by most of the small embedded software companies as well as companies such as TI, ST, Freescale etc. which make their own chips. You must also become familiar with open source development methodologies and how to get your code integrated into the main Linux kernel distribution (aka mainline). This is a very important part of development as at times your code may not be integrated into the mainline due to a variety of reasons such as improper coding style, duplication, irrelevance etc.

At the advanced level, you delve deeper in to the guts of Linux. There are multiple focus areas such as integrating new protocol stacks inside Linux or implementing them from scratch, integrating new filesystems or driver libraries such as libata etc. At this level you will be architecting solutions from scratch, making sure that your changes are consistent with the open source community and will be accepted in the Linux mainline once done. Linux is a very fast moving environment and various pieces keep on getting obsolete every 3-4 years. It is thus important to make wise development choices. Also, you may need to discuss and debate your changes first in the open source community before embarking on the project itself. Companies developing their own chips such as Freescale, LSI, TI etc. require this level of understanding on Linux. Also, companies selling advanced networking products such as Cisco are always on the lookout for such advanced knowledge on Linux.

At the kernel expert level, you will be tweaking the innermost parts of the Linux kernel. These include areas which are highly specific to the processor on which you are working e.g. memory management, task scheduling etc. or they could be the Input-Output (IO) sub-system or advanced networking packet processing related changes. Some of these areas of Linux are not touched for several years as they are very stable (no bugs found). However, at times it may be required to make modifications or do a complete re-write for various reasons. Several such changes went in when Linux moved from version 2.2.X to 2.4.X and then from 2.4.X to 2.6.X. Companies such as Google, VMWare, NetApp are just a few of those who are looking for such people. However, as with everything else, you have to develop respect and acceptance in the open source community in order to reach here. Something which is not achieved fast!

How to go about learning Linux?

The correct way to go about learning Linux is to first start from the user perspective. Become comfortable in doing your day-to-day tasks on a GNU/Linux system. Post that build expertise on at least one scripting language such as PERL, Ruby or Python (the latter two are preferred). Once you have done that, and you are sure about getting more insight into Linux, start off by writing some device drivers. Gradually build expertise on device drivers starting from the simplest such as mouse to quite complicated ones such as network cards. Post that you need to find an area in which you wish to focus and delve deeper. Do remember that some of the recognized experts in their areas have spent more than a decade, so, it will take time!

How can VirtuQTM help?


Currently VirtuQTM is offering a course on User Level Linux (code ULUX), which anyone can take to gain understanding of GNU/Linux from a user perspective. You do not need to have any prior background on UNIX to take this course. Shortly we will also offer courses on Linux Systems Programming as well as Linux network programming. Both these courses will provide you with novice-to-intermediate level understanding of the Linux kernel. This level of understanding is sufficient for entry level positions in all the companies which seek Linux developers. Currently we do not have any plans to offer any courses at the advanced and beyond level of Linux kernel. Sign up now and get started immediately on GNU/Linux.

Comments

  1. anon10128's Avatar
    Hi sir,
    Its a very nice blog. Thanks a lot for this blog. I wanted to know advantages of using GCC, GDB tools using commands in linux. Even the code blocks, turbo c use gcc comiler. How is linux different from these? In industries is it the GCC from commands or the eclipse IDE used?

    Thank you
    Updated 23-10-2013 at 03:26 PM by anon10128
  2. anup's Avatar
    Hi,

    If the toolchain is same, then it will behave in a similar fashion on different platforms. However, GNU/Linux is the de-facto development environment in companies and gaining experience on it is very rewarding. In most of the companies doing advanced work, IDEs are not used.

    Thanks,
    Anup
  3. saketh.linuxs1794's Avatar
    HI
    I have gone through the course description of "Linux Systems Programming" course and the information will be very much helpful for me.
    Is this the only course offered regarding system programming or more tutorials will be posted regarding this topic.
  4. anup's Avatar
    Hi Saketh,

    Glad to know that you like the contents of this course. As of now, we do not have any plans to offer more courses in this area. The course by itself is quite comprehensive especially if you do all the exercises. This will be sufficient in most of the cases. Please go through the course and let us know if you face any difficulty and/or have any questions.

    Cheers,
    Anup