Linux Command Line
The fast and easy beginner's guide to learn Linux basics in 7 easy steps.
[Steve Eddison]
Text Copyright [Daniel Peterson]
All rights reserved. No part of this guide may be reproduced in any form without permission in writing from the publisher except in the case of brief quotations embodied in critical articles or reviews.
Legal & Disclaimer
The information contained in this book and its contents is not designed to replace or take the place of any form of medical or professional advice; and is not meant to replace the need for independent medical, financial, legal or other professional advice or services, as may be required. The content and information in this book have been provided for educational and entertainment purposes only.
The content and information contained in this book has been compiled from sources deemed reliable, and it is accurate to the best of the Author's knowledge, information and belief. However, the Author cannot guarantee its accuracy and validity and cannot be held liable for any errors and/or omissions. Further, changes are periodically made to this book as and when needed. Where appropriate and/or necessary, you must consult a professional (including but not limited to your doctor, attorney, financial advisor or such other professional advisor) before using any of the suggested remedies, techniques, or information in this book.
Upon using the contents and information contained in this book, you agree to hold harmless the Author from and against any damages, costs, and expenses, including any legal fees potentially resulting from the application of any of the information provided by this book. This disclaimer applies to any loss, damages or injury caused by the use and application, whether directly or indirectly, of any advice or information presented, whether for breach of contract, tort, negligence, personal injury, criminal intent, or under any other cause of action.
You agree to accept all risks of using the information presented inside this book.
You agree that by continuing to read this book, where appropriate and/or necessary, you shall consult a professional (including but not limited to your doctor, attorney, or financial advisor or such other advisor as needed) before using any of the suggested remedies, techniques, or information in this book.
Table of Contents
Environment Variables
Introduction
Congratulations on downloading Linux command Line and thank you for doing so.
When you take a look at the Linux, it is imperative to try and look back at its evolution. Despite being one of the most powerful operating systems today, Linux had very humble beginnings, and below is the history of how it came to be.
Humble Beginnings
In 1969, Unix came to life, thanks to Ken Thompson and Dennis Ritchie. From that, several projects came up in the eighties based on Unix, trying to take it a step further. Projects such as BSD, The Book Operating Systems and MINIX all came up during this time. All this was water under the bridge until a bright Finnish student by the name of Linus Torvalds combined the knowledge he had about the previous system and came up with a Kernel that would later take the world by storm.
1991 is the true birth of Linux. Linus created a free terminal emulator based on MINIX, and he named his version Freax. Although he did not want it called Linux since it would have seemed egoistic, a friend of his renamed the version that had been uploaded to an FTP server for future development Linux and thus the name was born.
The Desktop Linux
The period between 1992 and 1994 saw the growth of the desktop founders. Slackware, Debian and Red Hat Linux were released during this period with Linux kernel version 0.95 that was able to run on the X Window System. Although Slackwares start was filled with many challenges, it became the first Linux distribution to support the 0.99 kernel version as well as TCP/IP stack. However, the release of Linux 1.0.0 in March 1994 was the game changer. This version boasted of 176, 250 lines of code, something that was extraordinary at this time.
The Launch of Gnome and KDE
The next chapter on the history of Linux took place between 1995 and 1999. Jurix Linux came out during this time, and it is believed to be the first Linux distribution to support bootp and NFS. It was possible to copy an installed version onto a similar machine. It is this distro that set the platform for the SUSE Linux that we know today. The Red Hat branch was not left behind. Within these five years, it had spearheaded the evolution of the Linux kernel from version 1.2.0 to 2.2. This pre-millennium era also saw a huge improvement in memory management and support for PowerPC architecture come to life. This was also when Linux started gaining popularity as the server OS of choice amongst IT professionals.
Other notable developments within this period were the establishment of the KDE and Gnome environments. KDE was founded by Matthias Ettrich, then a student at the University of Tbingen. On the other hand, Red Hat had evolved into the Gnome environment. While all these changes were happening, Sun and Oracle announced official support for the different versions of Linux.
Live Distributions
The next five years after the millennium hype saw the rise of some amazing things in the Linux family. Many Linux powered computers came to light, and the kernel also underwent a lot of changes. Heaps of new applications were developed and above all, the first live distro came to life.
Knoppix was popular between 2000 and 2005 because it could boot directly from CD. This happened in 2000 and set the bar high enough for other Linux distros. It is also imperative to note that Linux has also started losing its originality and looking more and more like Microsoft operating systems. This prompted the formation of the Linux Foundation to ensure that it regained its freedom and independence.
Another notable milestone during this period was the release of Linux kernel version 2.4 which had support for USB, PC cards, EXT3 file system, RAID, Bluetooth and PnP capabilities. Semantics are the set of rules that determine the meaning of instructions written in a programming language. While syntax is checked by the interpreter at the time of execution of the program, mistakes in the semantics of the program are usually harder to detect. To avoid semantic mistakes, it is advised to spend time on planning and analysis of the problem before starting to code it. If planned properly, the program will have fewer logical and semantical mistakes and thus the implementation will take much less time.
An example of mistake in the semantics of the language is when we calculate the mean of different numbers. Instead of dividing the sum of numbers with the (total number) if we divide it with (total number)-1 the result would be wrong but the interpreter would not show any errors because it does not understand the semantics of the programs, the programmer has to take care of it.
Now let us take a look at various parts of a Python program. Unlike compiler-based languages, an interpreter-based language does not need a complete program before it can parse it. It can take a single line of code and interpret it for the computer.
This kernel was so powerful that it became the longest supported one, ending with the release of 2.4.37.11 in 2011. Further updates to 2.6 saw the support for more CPUs, 16TB filesystem sizes and EXT4.
The Ubuntu Era
After 2005, things had started to stabilize, and this led to what came to be known as the Ubuntu era of 2006 to 2012. Linux Mint, todays most popular Ubuntu based distro was released in 2006. This era was mainly coupled with changes in the KDE with version 4.0 getting a lot of criticism. However, KDE 4.2 that was later released in 2009 fixed many of the issues of its predecessor. The Ubuntu era coincided with what is going to be or already is the largest Linux-based operating system, Android.