Introduction to Linux

Chapter I: Introduction

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1       Introduction to Linux. 3

2       History of Linux. 3

  1. The Beginnings of Unix. 3
  2. Evolution of Linux. 4
  3. History of Linux in Brief 4
  4. Understanding What Linux Is?. 6
  5. Architecture of Linux OS. 7
  6. Understanding How Linux Differs from Other Operating Systems 9
  7. Advantages of Linux. 9
  8. Disadvantages of Linux. 11
  9. Who really uses Linux anyway?. 12
  10. Features of Linux. 13
  11. Comparison between Linux and Windows 14
  12. Linux Distributions 14
  13. Linux Distribution: Ubuntu. 15
  14. Linux Distribution: Red Hat Enterprise Linux. 15
  15. Linux Distribution: CentOS. 16
  16. Linux Distribution: Fedora. 16
  17. Linux Distribution: Kali Linux. 16
  18. Free Software and Open Source. 16
  19. Free Software. 16
  20. Open-Source Software. 16
  21. Freeware. 17
  22. File System.. 17
  23. FAT. 18

Ø      FAT, Slack, and Unallocated Space. 19

Ø      FAT Overview.. 19

  1. NTFS (New Technology File System) 20
  2. Comparison NTFS & FAT. 20
  3. HFS (Hierarchical file system) 21
  4. EXT File System.. 21
  5. EXT2. 22
  6. EXT3. 22
  7. EXT4. 22
  8. Culture of Free Software. 24
  9. Author rights 24
  10. Free distribution. 24
  11. Copyright maintained. 24
  12. GNU: 24
  13. Comparison between Linux and Unix. 25
  14. How Linux and Unix is related?. 26

 

 

 

 

1        Introduction to Linux

Linux is an UNIX-like OS developed by Mr. Linus Torvalds and thousands of open-source contributors. There was an UNIX operating system before Linux was born. Linux was launch on date 17 Sep 1991.

After several years Mr. Linus comes up with an idea of Open-source distribution which is called Linux. These days Linux is more popular than UNIX, however base of any Linux OS is still UNIX because it follows same architecture. There are many contributors to Linux Kernel. Red Hat is one of the largest Linux distribution companies. 

 

2        History of Linux

 

Linux has its roots in Unix and Multics, two projects that shared the goal of developing a robust multiuser operating system.

a.     The Beginnings of Unix

 

Unix was developed out of the Multics project iteration at the Bell Laboratories. The developers working on Multics at Bell Labs and elsewhere were interested in building a multi-user operating system with single-level storage, dynamic linking and a hierarchical file system.

Bell Labs stopped funding the Multics project in 1969, but a group of researchers, continued working with the project’s core principles. In 1972-3 they made the decision to rewrite the system in C, which made Unix uniquely portable: unlike other contemporary operating systems, it could both move from and outlive its hardware.

Research and development at Bell Labs (later AT&T) continued, with Unix System Laboratories developing versions of Unix, in partnership with Sun Microsystems, that would be widely adopted by commercial Unix vendors. 

Meanwhile, research continued in academic circles, Computer Systems Research Group at the University of California Berkeley produced the Berkeley Software Distribution (BSD), which inspired a range of operating systems, many of which are still in use today. 

Two BSD distributions of historical note are NeXT Step, the operating system pioneered by NeXT, which became the basis for macOS and MINIX, an educational operating system that formed a comparative basis for Linus Torvalds as he developed Linux.

Unix is oriented around principles of clarity, portability, and simultaneity. UNIX remained proprietary in its earliest iterations.

 

b.    Evolution of Linux

In 1991, Linus Torvalds a student at the university of Helsinki, Finland, thought to have a freely available academic version of Unix started writing its own code. Later this project became the Linux kernel. He wrote this program specially for his own PC as he wanted to use Unix 386 Intel computer but couldn’t afford it. He did it on MINIX using GNU C compiler. GNU C compiler is still the main choice to compile Linux code but other compilers are also used like Intel C compiler.

He started it just for fun but ended up with such a large project. Firstly he wanted to name it as ‘Freax’ but later it became ‘Linux’.

He published the Linux kernel under his own license and was restricted to use as commercially. In 1992, he released the kernel under GNU General Public License.

Today, supercomputers, smart phones, desktop, web servers, tablet, laptops and home appliances like washing machines, DVD players, routers, modems, cars, refrigerators, etc use Linux OS.

 

3.   History of Linux in Brief

  • In the year 1991, Linux was introduced by a Finland student Linus Torvalds.
  • Hewlett Packard UNIX(HP-UX) 8.0 was released.
  • In the year 1992, Hewlett Packard 9.0 was released.
  • In the year 1993, NetBSD 0.8 and FreeBSD 1.0 released.
  • In the year 1994, Red Hat Linux was introduced, Caldera was founded by Bryan Sparks and Ransom Love and NetBSD1.0 Released.
  • In the year 1995, FreeBSD 2.0 and HP UX 10.0 were released.
  • In the year 1996, K Desktop Environment was developed by Matthias Ettrich.
  • In the year 1997, HP-UX 11.0 was released.
  • In the year 1998, the fifth generation of SGI Unix i.e IRIX 6.5, Sun Solaris 7 operating system, and Free BSD 3.0 was released.
  • In the year 2000, the agreement of Caldera Systems with the SCO server software division and the professional services division was announced.
  • In the year 2001, Linus Torvalds released the Linux 2.4 version source code. In the year 2001, Microsoft filed a trademark suit against Lindows.com
  • In the year 2004, Lindows name was changed to Linspire.
  • In the year 2004, the first release of Ubuntu was released.
  • In the year 2005, The project, openSUSE began a free distribution from Novell’s community.
  • In the year 2006, Oracle released its own distribution of Red Hat.
  • In the year 2007, Dell started distributing laptops with Ubuntu pre-installed in it.
  • In the year 2011, the Linux kernel 3.0 version was released.
  • In the year 2013, Google Linux-based Android claimed 75% of the smartphone market share, in terms of the number of phones shipped.
  • In the year 2014, Ubuntu claimed 22,000,000 users.

 

 

4.   Understanding What Linux Is?

Linux is a computer operating system. An operating system consists of the software that manages your computer and lets you run applications on it. The features that make up Linux and similar computer operating systems include the following:

  1. Detecting and preparing hardware: When the Linux system boots up, it looks at the components on your computer (CPU, hard drive, network cards, and so on) and loads the software (drivers and modules) needed to access those particular hardware devices.
  2. Managing processes: The operating system must keep track of multiple processes running at the same time and decide which have access to the CPU and when. The system also must offer ways of starting, stopping, and changing the status of processes.
  3. Managing memory: RAM and space (extended memory) must be allocated to applications as they need memory swap. The operating system decides how requests for memory are handled.
  4. Providing user interfaces: An operating system must provide ways of accessing the system. The first Linux systems were accessed from a command-line interpreter called a shell. Today, graphical desktop interfaces are commonly available as well.
  5. Controlling filesystems: Filesystem structures are built into the operating system (or loaded as modules). The operating system controls ownership and access to the files and directories (folders) that the filesystems contain.
  6. Providing user access and authentication: Creating user accounts and allowing boundaries to be set between users is a basic feature of Linux. Separate user and group accounts enable users to control their own files and processes.
  7. Offering administrative utilities: In Linux, hundreds (perhaps thousands) of commands and graphical windows are available to do such things as add users, manage disks, monitor the network, install software, and generally secure and manage your computer.
  8. Starting up services: To use printers, handle log messages, and provide a variety of system and network services, processes called daemon processes run in the background, waiting for requests to come in. Many types of services run in Linux. Linux provides different ways of starting and stopping these services. In other words, while Linux includes web browsers to view web pages, it can also be the computer that serves up web pages to others. Popular server features include web, mail, database, printer, file, DNS, and DHCP servers.
  9. Programming tools: A wide variety of programming utilities for creating applications and libraries for implementing specialty interfaces are available with Linux.

Modern Linux systems now go way beyond what the first UNIX systems (on which Linux was based) could do. Advanced features in Linux, often used in large enterprises, include the following: Clustering, Virtualization, Cloud computing, Real-time computing, Specialized storage.

 

5.   Architecture of Linux OS

The Linux Operating System’s architecture primarily has these components: the Kernel, Hardware layer, System library, Shell, and System utility.

 

 

 

 

 

  1. Kernel 

Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system. Kernel acts as a bridge between applications and data processing performed at hardware level using inter-process communication and system calls.

Kernel loads first into memory when an operating system is loaded and remains into memory until operating system is shut down again. It is responsible for various tasks such as disk management, task management, and memory management.

It decides which process should be allocated to processor to execute and which process should be kept in main memory to execute. It basically acts as an interface between user applications and hardware. The major aim of kernel is to manage communication between software i.e., user-level applications and hardware i.e., CPU and disk memory.

Objectives of Kernel:

  • To establish communication between user level application and hardware.
  • To decide state of incoming processes.
  • To control disk management.
  • To control memory management.
  • To control task management.
  1. System Libraries

System libraries are special programs that help in accessing the kernel’s features. A Kernel has to be triggered to perform a task and this triggering is done by the applications. But application must know how to place a system call because each kernel has a different set of system calls. Thus, standard library are developed to communicate with Kernel. Most well-known system library for Linux is GNU C library

  1. System Utility Programs

It is responsible for doing specialized level and individual activities.

  1. Hardware layer

Linux operating system contains a hardware layer that consists of several peripheral devices like CPU, HDD, and RAM.

  1. Shell

It is an interface among the kernel and user. It can afford the services of kernel. It can take commands through the user and runs the functions of the kernel. The shell is available in distinct types of OS. These operating systems are categorized into two different types, which are the graphical shells and command-line shells.

The graphical line shells facilitate the graphical user interface, while the command line shells facilitate the command line interface. Thus, both of these shells implement operations. However, the graphical user interface shells work slower as compared to the command-line interface shells.

There are a few types of these shells which are categorized as follows:

  1. Korn shell
  2. Bourne shell
  3. C shell
  4. POSIX shell

There are many GUI-based linux distributions like CentOS. In these we have a terminal to contact the shell. A terminal which we see in a GUI Server emulated a CLI Linux Server. Terminal emulators are more commonly used now due to the GUI OS like Mac OS or Ubuntu GUI.

 

 

6.    Understanding How Linux Differs from Other Operating Systems

You cannot see the code used to create the operating system, and therefore, you cannot change the operating system at its most basic levels if it doesn’t suit your needs, and you can’t use the operating system to build your own operating system from source code. You cannot check the code to find bugs, explore security vulnerabilities, or simply learn what that code is doing. You may not be able to plug your own software easily into the operating system if the creators of that system don’t want to expose the programming interfaces you need to the outside world.

 

7.   Advantages of Linux

 

  1. Open Source

As it is open-source, its source code is easily available. Anyone having programming knowledge can customize the operating system. One can contribute, modify, distribute, and enhance the code for any purpose.

  1. Security

The Linux security feature is the main reason that it is the most favorable option for developers. It is not completely safe, but it is less vulnerable than others. Each application needs to authorize by the admin user. The virus is not executed until the administrator provides the access password.  c) Free

Certainly, the biggest advantage of the Linux system is that it is free to use. We can easily download it, and there is no need to buy the license for it. It is distributed under GNU GPL (General Public License). Comparatively, we have to pay a huge amount for the license of the other operating systems.

  1. d) Lightweight

Linux is lightweight. The requirements for running Linux are much less than other operating systems. In Linux, the memory footprint and disk space are also lower. Generally, most of the Linux distributions required as little as 128MB of RAM around the same amount for disk space. e) Stability

Linux is more stable than other operating systems. Linux does not require to reboot the system to maintain performance levels. It rarely hangs up or slow down. It has big up-times. f) Performance

Linux system provides high performance over different networks. It is capable of handling a large number of users simultaneously.

  1. Flexibility

Linux operating system is very flexible. It can be used for desktop applications, embedded systems, and server applications too. It also provides various restriction options for specific computers. We can install only necessary components for a system.

  1. Software Updates

In Linux, the software updates are in user control. We can select the required updates. There a large number of system updates are available. These updates are much faster than other operating systems. So, the system updates can be installed easily without facing any issue. i) Distributions/ Distros

There are many Linux distributions available in the market. It provides various options and flavors of Linux to the users. We can choose any distros according to our needs. Some popular distros are Ubuntu, Fedora, Debian, Linux Mint, Arch Linux, and many more.

For the beginners, Ubuntu and Linux Mint would be useful and, Debian and Fedora would be good choices for proficient programmers.

  1. Live CD/USB

Almost all Linux distributions have a Live CD/USB option. It allows us to try or run the Linux operating system without installing it.

  1. Graphical User Interface

Linux is a command-line based OS but, it provides an interactive user interface like Windows.

l). Suitable for programmers

It supports almost all of the most used programming languages such as C/C++, Java, Python, Ruby, and more. Further, it offers a vast range of useful applications for development.

The programmers prefer the Linux terminal over the Windows command line. The package manager on Linux system helps programmers to understand how things are done. Bash scripting is also a functional feature for the programmers. It also provides support for SSH, which helps in managing the servers quickly.

  1. Community Support

Linux provides large community support. We can find support from various sources. There are many forums available on the web to assist users. Further, developers from the various opensource communities are ready to help us.

  1. Privacy

Linux always takes care of user privacy as it never takes much private data from the user. Comparatively, other operating systems ask for the user’s private data.

  1. Networking

Linux facilitates with powerful support for networking. The client-server systems can be easily set to a Linux system. It provides various command-line tools such as ssh, ip, mail, telnet, and more for connectivity with the other systems and servers. Tasks such as network backup are much faster than others.

  1. Compatibility

Linux is compatible with a large number of file formats as it supports almost all file formats. q) q)  Multiple Desktop Support

Linux system provides multiple desktop environment support for its enhanced use. The desktop environment option can be selected during installation. We can select any desktop environment such as GNOME (GNU Network Object Model Environment) or KDE (K Desktop Environment) as both have their specific environment.

  1. r) Multitasking

It is a multitasking operating system as it can run multiple tasks simultaneously without affecting the system speed.

 

8.   Disadvantages of Linux

  1. No standard edition.
  2. Hard Learning Curve.
  3. Limited market share.
  4. Lack of proprietary software.
  5. Difficult to troubleshoot.
  6. Poor support for games.
  7. Unsupported Hardware.
  8. Lack of technical support.

 

9.   Who really uses Linux anyway?

  • Android is Linux-based (there are currently more than 2.5 billion Android devices, representing 85% of the mobile market and 40% of all devices connected to the Internet)
  • AWS, Azure, Google, Rackspace and others use Linux to deliver their cloud services
  • Linux is running on most resource constrained devices, including IoT hardware and Raspberry Pi boards
  • A large percentage of home Internet routers run Linux.
  • Telco networks are largely Linux-based (e.g., AT&T, Verizon, Nippon Telephone & Telegraph, China Mobile, Vodafone, Telefonica, etc.)
  • Science-based organizations, particularly those running supercomputers, rely on Linux (e.g., NASA, CERN, NOAA, universities, etc.)
  • The defense industry uses Linux to run submarines, ground control systems, radar, aircraft carriers, warships, etc.
  • Countries like the US, China, North Korea, Germany, Estonia, Iceland, Spain, India, Brazil, etc. use Linux in multiple public sector applications, especially for education, law enforcement, military, and e-government
  • National e-voting systems across the world predominantly use Linux
  • Embedded control systems for power utilities, water companies, manufacturing, auto assembly, etc. all use Linux
  • Most global stock exchanges run on Linux
  • Most in-flight entertainment systems run on Linux
  • Sabre, the ubiquitous airline reservation system, runs on Linux
  • Connected car systems run on Linux
  • The most innovative software such as OpenStack, Docker, Juju, Kubernetes, etc. were all designed initially to support Linux
  • Linux supports 32-bit and 64-bit x86, ARM, MIPS, SPARC, POWER microprocessors – making it highly portable
  • Linux runs on many types of obscure and outdated hardware

 

10.         Features of Linux

  1. Multiuser capability:

Multiple users can access the same system resources like memory, hard disk, etc. But they have to use different terminals to operate.

  1. Multitasking:

More than one function can be performed simultaneously by dividing the CPU time intelligently. c) c)   Portability:

Portability doesn’t mean it is smaller in file size or can be carried in pen drives or memory cards. It means that it supports different types of hardware.

  1. Security:

It provides security in three ways namely authenticating (by assigning password and login ID), authorization (by assigning permission to read, write and execute) and encryption (converts file into an unreadable format).

  1. Live CD/USB:

Almost all Linux distros provide live CD/USB so that users can run/try it without installing it.

  1. Graphical User Interface (X Window system):

Linux is command line-based OS but it can be converted to GUI based by installing packages.

  1. Support’s customized keyboard:

As it is used worldwide, hence supports different languages keyboards.

  1. Application support:

It has its own software repository from where users can download and install many applications.

  1. i) File System:

Provides hierarchical file system in which files and directories are arranged.

  1. j) Open Source:

Linux code is freely available to all and is a community-based development project.

 

 

 

11.         Comparison between Linux and Windows

Basis for

Comparison

Linux

Windows

Access

In Linux, the user has access to the source code of the kernel and alter the code according to his need. It has its own advantages, like bugs in OS will fix at a rapid pace and disadvantages like developers may take advantage of any weakness in OS if they found.

In windows, every user won’t have access to the source code; only members of the selected group will have access to it.

Flavors or Variety

Linux has various distributions which are highly customizable based on user needs.

Windows has very few customization options available.

Licensing

In Linux with GPL- Licensed operating system, users are free to modify the software, can re-use in any number of systems and even they can sell the modified version.

In windows, with a Microsoft license, users won’t have access to source code (can’t modify the software) and based on a number of licenses – we can install only on those number of computers.

Command-

line

In Linux, the command line is a very useful tool for administration and daily tasks but for end-users, it doesn’t make much difference.

In windows, we have a command line but can’t use a Linux command line. We need to go running and enter cmd then the command line will open.

Run level

Linux has an inbuilt ability to stop at different run levels; with this, we can work using a command line and GUI if anyone has an issue.

In windows, if we encounter any problem in order to fix it, we need to reboot at run level 3 as an administrator/root to find and fix the problem.

Usability

Linux is complicated to install but has the ability to complete complex tasks easier.

Windows gives user’s a simple system to operate, but it will take a longer time to install.

Support

Linux has support via a huge community of user forums/websites and online search.

Windows has support that is easily accessible, online forums/ websites, and it has paid support also.

 

12.         Linux Distributions

A Linux distribution (often abbreviated as distro) is an operating system made from a software collection that is based upon the Linux kernel and, often, a package management system. Linux users usually obtain their operating system by downloading one of the Linux distributions, which are available for a wide variety of systems ranging from embedded devices and personal computers to powerful supercomputers.

A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system (the most common being the X Window System, or, more recently, Wayland), a window manager, and a desktop environment.

A Linux distribution may also be described as a particular assortment of application and utility software (various GNU tools and libraries, for example), packaged together with the Linux kernel in such a way that its capabilities meet the needs of many users.

a.       Linux Distribution: Ubuntu

Created and maintained by Canonical, Ubuntu is one of the most popular Linux distros enjoyed across the globe by beginners, intermediate users, and professionals alike. Ubuntu was specifically designed for beginners in Linux or those transitioning from mac and Windows.

By default, Ubuntu ships with GNOME desktop environment with every day out-of-the-box applications such as Firefox, LibreOffice, and image editing applications such as GIMP, music players, and video players such as Audacious and Rhythmbox.

Ubuntu forms the basis of several other Linux distributions. Some of the distributions based on Ubuntu 20.04 include Lubuntu 20.04 LTS, Kubuntu 20.04, and Linux Mint 20.04 LTS (Ulyana).

Due to its user-friendliness and elegant UI, Ubuntu is ideal for desktop users and newcomers who are trying to wrap their head around Linux. They can readily get started with default Apps as stated earlier on as they work their way towards getting a better understanding of Linux.

b.     Linux Distribution: Red Hat Enterprise Linux

Abbreviated as RHEL, Red Hat Enterprise Linux is a Linux distro designed for Enterprise or commercial purposes. It’s one of the leading open-source alternatives to other proprietary systems such as Microsoft. Red Hat is usually a top choice for server environments given its stability and regular security patches which boost its overall security.

You can readily set it up on physical servers, virtual environments such as VMware, HyperV, and also on the cloud. Red Hat has done a perfect job in containerization technology thanks to OpenShift PaaS (platform as a service), a hybrid cloud environment that is built around Docker containers and managed by Kubernetes.

Where efficiency, security, and stability are of utmost priority RHEL is the ideal distro to opt for. RHEL is subscription-based and the subscription is renewed annually. You can purchase a license for an array of subscription models such as Linux Developer Workstation, Linux developer suite, and Linux for Virtual Datacenters.

c.      Linux Distribution: CentOS

The CentOS Project is a community-driven free operating system that aims at delivering a robust and reliable open source ecosystem. Based on RHEL, CentOS is a perfect alternative to Red Hat Enterprise Linux since it is free to download and install. It gives users the stability and reliability of RHEL while allowing them to enjoy free security and feature updates. CentOS 8 is a favourite among Linux enthusiasts who want to savour the benefits of RHEL.

The latest version is CentOS 8.2 which is the third iteration of CentOS 8. It relies on App stream and BaseOS repositories and ships with the latest software packages such as Python 3.8, GCC 9.1, Maven 3.6, etc.

d.     Linux Distribution: Fedora

Fedora has enjoyed a reputation for being one of the most user-friendly distros for quite a while now owing to its simplicity and out-of-the-box applications which enable newcomers to easily get started. It’s a powerful and flexible operating system that’s tailored for desktops & laptops, servers, and even for

IoT ecosystems. Fedora, just like CentOS, is based on Red Hat and is in fact, a testing environment for Red Hat before transitioning to the Enterprise phase. As such, it’s usually used for development and learning purposes and comes in handy for developers and students.

Fedora has for a while now used the DNF package manager ( and still uses it as its default package manager) and offers the latest and the very best in RPM software packages. The latest Fedora is Fedora 32.

e.      Linux Distribution: Kali Linux

Developed and maintained by offensive security, Kali Linux is a Debian-based Linux distro designed for penetration testing and conducting digital forensics. It ships with out-of-the-box tools meant for penetration testing such as Nmap, Metasploit Framework, Maltego, and Aircrack-ng to mention a few. Kali Linux is meant for Cybersecurity experts and students who want to venture into penetration testing. In fact, Kali provides industry-standard certifications such as Penetration Testing with Kali and Kali Linux Certified Professional.

 

13.         Free Software and Open Source

a.      Free Software

“Free software” means software that respects users’ freedom and community. Roughly, it means that the users have the freedom to run, copy, distribute, study, change and improve the software. The term “free software” is sometimes misunderstood—it has nothing to do with price. It is about freedom.

 

b.      Open-Source Software

Open-Source Software is something which you can modify as per your needs, share with others without any licensing violation burden. When we say Open Source, source code of software is available publicly with Open-Source licenses like GNU (GPL) which allows you to edit source code and distribute it. Read these licenses and you will realize that these licenses are created to help us.

Coined by the development environments around software produced by open collaboration of software developers on the internet.

Later specified by the Open-Source Initiative (OSI).

It does not explicitly state ethical values, besides those directly associated to software development.

 

c.       Freeware

Freeware is any software that is distributed for use at a price of zero. However, freeware may not be “free software”. The Free Software Foundation defines free software as software that gives its users the freedom to share, study and modify it. It has no copyright or other restrictions for distributing, modifying and using the software in any way.

For example, a software developer may choose to make her software available for download and use on her website. This software may be freeware if downloaded for personal use but commercial use may require a fee. In either case, if it is prohibited to freely distribute (for any purpose) or modify the software, then this freeware is not free software.

License and Copyright: GNU General Public License or sometime similar. A copyright is usually put just on the name of the software.

Example:Mozilla Firefox, gedit, vim, pidgin, GNU Coreutils, Linux kernel

 

             

14.         File System

File systems are standards and data structure for organizing data on storage devices. A file system is a process that manages how and where data on a storage disk (HDD), is stored, accessed and managed.It is a logical disk component that manages a disk’s internal  operations as it relates to a computer and is abstract to a human user.

File system divide the spaces available on the storage space on a drive into virtual compartment known as clusters and maintain an index where individual files are located and available free space.

  • FAT
  • NTFS
  • EXT

 

a.      FAT

The File Allocation Table (FAT) file system is a simple file system originally designed for small disks and simple folder structures. The FAT file system is named for its method of organization, the file allocation table, which resides at the beginning of the volume. To protect the volume, two copies of the table are kept, in case one becomes damaged.

 

In addition, the file allocation tables and the root folder must be stored in a fixed location so that the files needed to start the system can be correctly located.

A volume formatted with the FAT file system is allocated in clusters. The default cluster size is determined by the size of the volume. For the FAT file system, the cluster number must fit in 16 bits and must be a power of two.

 

Ø  FAT, Slack, and Unallocated Space

 

Ø  FAT Overview

  • Simple and common file system
  • Found on all Windows OS and many devices o FAT12: Developed 1977 (MS Disk BASIC) o FAT16: Developed 1987 (MS-DOS 3.31) o FAT32: Developed 1996 (Win95 OSR2) ➢ Few data structures supported:
    • Cluster: Basic storage unit for files
    • Directory: Lists file name, starting cluster, and length
    • File Allocation Table: Contains cluster status and pointer to next cluster in chain

A FAT file system has four different sections, each as a structure in the FAT partition. The four sections are:

  1. Boot Sector:

This is also known as the reserved sector; it is located on the first part of the disc. It contains: the OS’s necessary boot loader code to start a PC system, the partition table known as the master boot record (MBR) that describes how the drive is organized, and the BIOS parameter block (BPB) which describes the physical outline of the data storage volume. b. FAT Region:

This region generally encompasses two copies of the File Allocation Table which is for redundancy checking and specifies how the clusters are assigned.

  1. Data Region:

This is where the directory data and existing files are stored. It uses up the majority of the partition.

  1. Root Directory Region:

This region is a directory table that contains the information about the directories and files. It is used with FAT16 and FAT12 but not with other FAT file systems. It has a fixed maximum size that is configured when created. FAT32 usually stores the root directory in the data region so it can be expanded if needed.

 

b.    NTFS (New Technology File System)

NTFS is the file system, which stands for NT file system and stores and retrieves files on Windows NT operating system and other versions of Windows like Windows 2000, Windows XP, Windows 7, and Windows 10. Sometimes, it is known as the New Technology File System. As compared to the FAT, it provides better methods of file recovery and data protection and offers a number of improvements in terms of extendibility, security, and performance.

NTFS Features

  • NTFS supports disk usage quotas. These quotas are set by an administrator to restrict the amount of disk space that a user can take up. It’s used mainly to control the amount of shared space someone can use, usually on a network drive.
  • File attributes previously unseen in Windows operating systems, like the compressed attribute and indexed attribute, are available with NTFS-formatted drives.
  • Encrypting File System is another feature supported by NTFS. EFS provides file-level encryption, which means that individual files and folders can be encrypted. This is a different feature than fulldisk encryption, which is the encryption of an entire drive (like what’s seen in these disk encryption programs).
  • NTFS is a journaling file system, which means it provides a way for system changes to be written to a log, or a journal, before the changes are actually written. This feature allows the file system to revert to previous, well-working conditions in the event of a failure because the new changes have yet to be committed.
  • Support file permission setup.
  • Volume Shadow Copy Service is an NTFS feature used by online backup service programs and other backup software tools to back up files that are currently being used, as well as by Windows itself to store backups of your files.
  • Limited non-windows OS compatibility – eg read only on macOS and older linux destros.

 

c.     Comparison NTFS & FAT

FAT file system have 3 major variant: FAT12, FAT16, FAT32. 

Each has an increasing number of clusters and maximum file and volume sizes.

 

 

d.    HFS (Hierarchical file system)

HFS (Hierarchical file system) is the file system that is used on a Macintosh computer for creating a directory at the time a hard disk is formatted. Generally, its basic function is to organize or hold the files on a Macintosh hard disk. Apple is not capable of supporting to write to or format HFS disks since when OS X came on the market. Also, HFS-formatted drives are not recognized by Windows computers as HFS is a Macintosh format. With the help of WIN32 or NTFS file systems, Windows hard drives are formatted.

 

e.     EXT File System

The ext file system stands for “Extended File System”. It was the first file system Designed to support the Linux kernel. Its primary purpose was to allow the Linux kernel to access the ext file system. The ext file system restricted filename lengths to 255 characters and supported partitions up to 2GB.

 

While it managed to solve issues that the Minix file system had, it had one major flaw – timestamping. Unlike today where each Linux file has three timestamps (access timestamp, modified timestamp, and changed timestamp), the ext file system allowed only one timestamp per file. In January 1993, the ext2 file system was introduced. In time, all users switched from ext to ext2.

 

f.      EXT2

Remi Card designed the ext2 file system and released it in January 1993, less than a year after introducing the ext file system.

The ext2 file system enabled the retention of the internal structure while the file system functionalities extended. Data from files were kept in data blocks of the same length. The ext2 file system supported the maximum file size of 2TiB. Filename lengths were not limited in characters, but in bytes – 255 bytes.

It did not support journaling. 

While this file system was largely used, it still had two major issues:

File corruption – This phenomenon would occur if data were written to the disk at the time of a power loss or system crash.

Performance loss – Disk fragmentation happens when a single file is broken into pieces and spread over several locations on the disk. As a result, files take longer to read and write, which leads to performance degradation.

The ext2 system was mostly used until the early 2000s when the ext3 file system was introduced. It is occasionally used today for USB devices because it does not support the journaling system.

 

g.     EXT3

Stephen Tweedie designed the ext3 file system. It launched in November 2001 with Linux kernel 2.4.15.

It is still in use today.

The ext3 file system is an improved version of ext2 file system. It supports a maximum file size of 2TiB and restricts maximum filename length to 255 bytes, like the ext2 file system. The improvement is reflected in journaling.

The journaling system keeps a “journal” of all changes in the data structure that are yet to be committed. In case of power loss or system crash, logs stored via the journaling system return data in a manner of seconds, reducing the risk of corruption or data loss. The system writes the data in the correct areas of the file system when the log is updated.

 

h.    EXT4

The ext4 file system is the default file system of the current Linux kernel. It was introduced in October 2008 with Linux kernel 2.6.28.

 

The ext4 file system supports the maximum file size of 16TiB and restricts maximum filename lengths to 255 bytes.

 

             

15.Culture of Free Software

The culture of free software development from which Linux has thrived and will continue to thrive. The copyright for Fedora and other Red Hat Linux systems is covered under the GNU public license. That license, which most free software falls under, provides the following:

a.     Author rights

The original author retains the rights to his or her software.

b.    Free distribution  

People can use the GNU software in their own software, changing and redistributing it as they please. They do, however, have to include the source code with their distribution (or make it easily available).

  1. Copyright maintained — Even if you were to repackage and resell the software, the original GNU agreement must be maintained with the software. This means that all future recipients of the software must have the opportunity to change the source code, just as you did. It is important to remember that there is no warranty on GNU software. If something goes wrong, the original developer of the software has no obligation to fix the problem. However, the Linux culture has provided resources for that event. Experts on the Internet can help you iron out your problems, or you can access one of the many Linux newsgroups to read how others have dealt with their problems and to post your own questions about how to fix yours. Chances are that someone will know what to do — maybe even going so far as to provide the software or configuration file you need.
  2. GNU: GNU is an extensive collection of free software (383 packages as of January 2022), which can be used as an operating system or can be used in parts with other operating systems. The use of the completed GNU tools led to the family of operating systems popularly known as Linux. Most of GNU is licensed under the GNU Project’s own General Public License (GPL). Richard Stallman, founder of the GNU project

GNU is also the project within which the free software concept originated. Richard Stallman, the founder of the project, views GNU as a “technical means to a social end”.[10] Relatedly, Lawrence Lessig states in his introduction to the second edition of Stallman’s book Free Software, Free Society that in it Stallman has written about “the social aspects of software and how Free Software can create community and social justice”.

 

 

 

 

16. Comparison between Linux and Unix

Comparison

Linux

Unix

Definition

It is an open-source operating system which is freely available to everyone.

It is an operating system which can be only used by its copyrighters.

Examples

It has different distros like Ubuntu, Redhat, Fedora, etc.

IBM AIX, HP-UX and Sun Solaris.

Users

Nowadays, Linux is in great demand. Anyone can use Linux whether a home user, developer or a student.

It was developed mainly for servers, workstations and mainframes.

Usage

Linux is used everywhere from servers, PC, smartphones, tablets to mainframes and supercomputers.

It is used in servers, workstations and PCs.

Cost

Linux is freely distributed,

downloaded, and distributed through magazines also. And priced distros of

Linux are also cheaper than Windows.

Unix copyright vendors decide different costs for their respective Unix Operating systems.

Development

As it is open source, it is developed by sharing and collaboration of codes by world-wide developers.

Unix was developed by AT&T Labs, various commercial vendors and non-profit organizations.

Manufacturer

Linux kernel is developed by the community of developers from different parts of the world. Although the father of Linux, Linus Torvalds oversees things.

Unix has three distributions IBM AIX, HP-UX and Sun Solaris. Apple also uses Unix to make OSX operating system.

GUI

Linux is command based but some distros provide GUI based Linux.

Gnome and KDE are mostly used GUI.

Initially it was command-based OS, but later Common Desktop Environment was created. Most Unix distributions use Gnome.

Interface

The default interface is BASH (Bourne Again SHell). But some distros have developed their own interfaces.

It originally used Bourne shell. But is also compatible with other GUIs.

File system support 

Linux supports more file system than Unix.

It also supports file system but lesser than Linux.

Coding

Linux is a Unix clone, behaves like Unix but doesn’t contain its code.

Unix contain a completely different coding developed by AT&T Labs.

Operating system

Linux is just the kernel.

Unix is a complete package of Operating system.

Security

It provides higher security. Linux has about 60-100 viruses listed till date. 

Unix is also highly secured. It has about 85120 viruses listed till date

Error detection and solution

As Linux is open-source, whenever a user post any kind of threat, developers from all over the world start working on it. And hence, it provides faster solution.

In Unix, users have to wait for some time for the problem to be resolved.

 

17.How Linux and Unix is related?

  • Linux is not Unix, but it is a Unix-like operating system. Linux system is derived from Unix and it is a continuation of the basis of Unix design. Linux distributions are the most famous and healthiest example of the direct Unix derivatives. BSD (Berkley Software Distribution) is also an example of a Unix derivative.
  • As per Linux kernel official README file, Linux is a UNIX clone that is developed from scratch by Linus Torvalds and team. It targets for POSIX compliance. The Linux kernel code was completely written from scratch. It is designed in such a way so that it acts like Unix but it does not have the original Unix code in it.
  • Just like UNIX Linux core component is Kernel.
  • Linux and UNIX both have similar architecture with Kernel at the core which is responsible to instruct computer hardware.
  • Both are multi-user OS.
  • Both have hierarchical file system and file base OS.

 

Leave Comment

Your email address will not be published.