Chapter 1: Linux Operating System
Total Page:16
File Type:pdf, Size:1020Kb
CHAPTER 1: LINUX OPERATING SYSTEM A bit of history What is Linux? A short answer to this question is "a computer operating system based on Linux kernel and GNU tools and libraries". In order to understand what Linux is, first we need to know different concepts such as Linux, kernel, and GNU. Formally, Linux is not an operating system. It's just a software component working as a bridge between applications and the data processing done by the hardware. Because of this fact, the kernel is the core component of an operating system. First Linux kernel was written by Linus Torvalds in 1991. Usually, the term Linux is used to refer to a whole operating system based on the kernel. However, an operating system needs more components to be complete. At this point, there are a number of operating system based on Linux kernel, plus a set of tools provided by the GNU open source project. What are GNU tools? Well, first of all we should learn about the GNU project. Basically, this is an open source project started by Richard Stallman with the goal of building a set of software components and tools to avoid the use of any software that is not free. Now that we've learned about Linux, kernel, and GNU, we can define a distribution as a composition of Linux kernel and GNU tools and other useful software. We've just mentioned a new concept—distribution. Have you heard about Linux mascot: Tux the penguin Ubuntu, Fedora, or Debian? These three are examples of Linux distributions. A Linux distribution can be defined as a whole operating system providing a kernel, a system of base tools, and a complete set of applications ready to use for users. This guide is based on Linux Mint, a distribution that started back in 2006 with a goal to be fully usable on the desktop computers. What is open source? Linux is an open source project supported by hundreds of volunteers and contributors. This means that people work together sharing ideas, writing tutorials, discussing in forums, and developing software. The final result is not only the Linux distribution, but a lot of documentation is generated as well. Collective intelligence allows us to build one of the most used operating systems in the world. We cannot forget that Linux operating system (OS) is open source, and it's released under the popular General Public License (GPL) software license. All people contributing to Linux project make up the community. In the open source world, a community is a set of users and developers supporting a specific project. Everyone can contribute to a Linux project in different ways and that's the magic of open source projects, where the job of each person matters. The first area is for those who want to develop software, write documentation, make artwork, or report bugs. However, non-technical people can contribute to this area as well, for instance, they can make translations to get more and more languages supported. The promotion of the project and distribution can be for those who are interested in helping others, writing articles, or organizing local presentation for spreading the knowledge. CHAPTER 2: INSTALLING LINUX MINT Boot process, partitions and mounting A typicall boot process of every operating system consist of a few steps: Majority of Linux distributions use a boot loader named GRUB (Grand Unified Boot Loader) which handles booting different OSes from different hard drives, partitions and file systems. Boot loader is a piece of software usually installed in the first 512KB of the Master Boot Record (MBR) on the first hard drive. As you know, hard drives are divided into partitions and each partition uses a file system. Linux OSes name physical hard drives as SDA, SDB, SDC and so on, where SDA is the first physical disk, SDB is the second physical disk etc. “S” in the name stands for SATA, “D” for the disk. When we add partitions to the mix numbers are added. So, the first partition on the first hard drive is SDA1, second partition will be named SDA2 and so on. Following this convention you can easily know that the fourth partition on the third disk will be named SDC4. All partitions are attached to the system via a mount point. The mount point defines the place of a particular data set in the file system. Mount points are directories. These empty directories will be the starting point of the partitions that are attached to them. Linux distributions also use a different partition mounting scheme than Windows. In a Windows installation you typically have C and D partitions; first one for the OS itself, and the second for user data. Linux installation also uses two partitions. Root partition, mounted to / , is where the system is installed, while the other partition which is mounted to /home is the place for each users data files and software preferences. In addition to root and home partitions, sometimes a swap partition is needed, typically for systems with 1GB or less of RAM. Swap partition is used as a virtual memory when the OS runs out of physical RAM. On Windows OSes this is known as the page file. Windows Linux Physical location Name Mount point Name Mount point First hard drive, first partition disk(0)rdisk(0)partition(1) C sda1 / First hard drive, second partition disk(0)rdisk(0)partition(2) D sda2 /home Comparison between Windows and Linux HDD naming schema A file system is used to control how data is stored and retrieved. Without a file system, information placed on a hard disk would be one large body of data with no way to tell where one piece of information stops and the next begins. By separating the data into individual pieces, and giving each piece a name, the information is easily separated and identified. Windows typically uses NTFS and FAT32 file systems, depending on the size of the disk. Linux supports a wide range of file systems, some of which are used more often than the others. Most widely used file system on Linux is EXT4, preceded by EXT3. Future kernel version feature a new file system called BTRFS with some advanced algorithms and techniques for storing and retrieving data. Editions As other operating systems, Linux Mint has different editions or flavors. Basically, we can find two main editions—one based on Debian, which is called Linux Mint Debian Edition (LMDE), and another one based in Ubuntu. In addition to Ubuntu and Debian software repositories, Linux Mint uses its specific ones. LMDE is a rolling release. This means the distro constantly receives updates without generating releases. However, releases for the regular Mint edition (the one based on Ubuntu which we will use) are only generated by following a specific period of time. Despite LMDE being faster and more responsive than Linux Mint, non-advanced users should think again before using it because continuous Linux Mint logo updates can bring some errors that they might find difficult to solve. On the other hand, Linux Mint is easy to maintain and was designed to offer an unbeatable user experience.The Linux Mint project distributes each edition through different ISO images, each being ready to be burned on a DVD. Regarding the regular edition of Linux Mint, we can find eight different ISO images. Well, we only have four that are really different, because each one has its own equivalent in 32b and 64b. Four different desktop environments are included—MATE, Cinnamon, KDE, and Xfce. This guide will focus on Linux Mint 64bit with Cinnamon desktop environment. Hardware requirements Device Minimum Optimal CPU 1GHz 32bit 1GHz 32bit RAM 512MB 1GB HDD 8GB 8GB VGA 2D, 800 x 600 resolution 3D, 1024 x 768 resolution Creating a bootable USB drive 1. Download Linux Mint 16 from this link: goo.gl/Z3XIPW 2. Download Unetbootin from this link: unetbootin.sourceforge.net 3. Open Unetbootin, choose Disk image and browse to downloaded ISO file 4. Choose your USB drive carefully and click OK. After a few minutes USB drive will be ready and bootable Installation 1. Reboot your computer and select your USB drive as the device for booting. 2. After boot you should see a screen like this. Press Enter and allow it to finish booting 3. After bootup is finished you should see a desktop like this. Linux Mint is usable as a LiveCD which means it can be used directly from USB or CD drive without installation. LiveCDs are usefull when you have a non working hard disk or a faulty Windows installation to recover your files. 4. Double click “Install Linux Mint” icon and choose your language options 5. Next screen will make sure that your computer can install and run Linux Mint 6. This screen lets you choose installation type. First option will erase your entire HDD and automatically create partitions. We don't want that, so choose “Something else” which lets you create the partitions manually 7. On this screen choose “New partition table” and proceed with “Continue” when prompted. Create two partitions as noted in the introduction: one for the system (root partition) and one for user data (home partition) like in the picture below. Note the boot loader installation path is /dev/sda which is the MBR of the first hard drive 8. Next screen will automatically set your timezone, change if needed 9. After time zone, choose your keyboard layout, as in the picture below 10. Last step allows you to enter your name, username and your password After a few minutes the setup will finish installing Linux Mint and offer you to restart your system.