Linux Unit1
Linux Unit1
2024/04/08 1
Linux
Course Contents
1. Introduction
2. Basic of Linux
3. Installation of Linux
4. System Administration
5. User Management
6. Security and System Handling
7. Setting Up a Web server
8. Setting up DHCP and NIS
9. Setting Up a Database server
10. Setting Up a DNS server
11. ISP simulation
2
Linux
Introduction
• Operating systems are used everywhere in the world today. An
operating system is needed for every computer, from a smartphone to a
supercomputer. Linux is an operating system used a lot in many
different places, like servers, embedded systems, personal computers,
and mobile devices.
3
Linux
History
The Linux operating system is based on Unix. So before we learn the history of Linux, we
need to know about Unix. In the 1960s, a group of programmers led by Ken Thompson and
Dennis Ritchie created Unix at Bell Labs. Unix was an operating system that was initially
made for powerful mainframe computers. Later on, it was modified so smaller computers
could also run it.
Evolution of Linux The open-source operating system Linux has greatly changed since it was
first built. Early versions of Linux were primarily controlled by the command line and didn't
have the easy-to-use graphical interfaces that other operating systems had. But because the
system was flexible, reliable, and safe, many developers started building graphical interfaces
and a wide range of software applications.
Linux has become more popular as businesses and organizations have started to use it and
as cloud computing has become more widespread. It has become a flexible and extensively
used operating system that can run on everything from small embedded devices to high-
performance supercomputers. It has changed through time because of the community of
developers and users who continue to work on it and help it grow.
4
Linux
Features of Linux
The reason why Linux became so popular is because of its inbuilt natural features. Let's
learn all the natural features.
Customizable: Users can modify and customize the system to meet their specific needs.
Stability: Linux is regarded as stable and reliable, making it a popular choice for servers and
other systems that need to work well all the time.
Security: Viruses and malware are less likely to affect Linux than other operating systems,
making it a safe choice for businesses and individuals.
Flexibility: Linux can be modified to run on various hardware platforms, from small
embedded devices to supercomputers.
Open-source: The source code is available to everyone, which allows for transparency and
encourages the community to help with its development and expansion.
Cost-effective: Linux is generally free, or it can be called affordable, making it a good choice
for individuals and businesses.
5
Linux
Overall, Linux's qualities have helped it become famous and successful and made it an excellent
alternative to operating systems that are not affordable.
Conclusion The history of Linux starts with the development of Unix at Bell Labs in the 1960s.
• In the 1980s, businesses like Sun Microsystems, Hewlett-Packard, and IBM made commercial
versions of Unix that were tailored for specific hardware platforms and had more features.
• Linus Torvalds invented Linux in 1991 as a free and open-source alternative to proprietary operating
systems. It immediately became popular among computer enthusiasts.
• Linux's development has been driven by a community of developers and users who have helped make
it flexible, stable, safe, and affordable.
• Linux is used in many servers, supercomputers, and embedded devices, and its evolution will continue
to influence the industry.
6
Linux
Advantages of Linux
Linux offers several advantages over other operating systems, which contribute to its popularity in
various domains:
Open Source: Being open-source means that Linux is not only free to use but also allows users to view
and modify the source code. This fosters a vibrant community of developers and encourages innovation.
Customization: Linux distributions can be tailored to specific needs. Users can select from a vast array
of software packages and desktop environments, creating a highly customized computing environment.
Stability: Linux is known for its stability, which is essential for servers and critical systems. It can run
for extended periods without performance degradation.
Security: Linux has a strong security model with user and group permissions, mandatory access
controls (e.g., SELinux), and regular security updates. This makes it less susceptible to malware and
other security threats.
7
Linux
Performance: Linux is efficient in terms of resource utilization. It can run on a wide range of hardware,
from embedded devices to supercomputers, with minimal overhead.
Community Support: The Linux community is vast and active, providing extensive online resources,
forums, and documentation. This makes it easy to find help and solutions to problems.
Scalability: Linux scales well from small devices to large data centers. It can handle heavy workloads
and is often the choice for cloud computing and virtualization.
Compatibility: Linux supports a wide variety of file systems and network protocols, ensuring
compatibility with various technologies and software.
8
Linux
File systems
File systems are essential components of any operating system, as they dictate how data is stored,
organized, and accessed on storage devices such as hard drives and SSDs. FAT (File Allocation Table),
NTFS (New Technology File System), and EXT (Extended File System) are three different file systems used
primarily on various operating systems.
Here's a detailed explanation of each:
File Allocation Table
History: FAT was initially introduced by Microsoft in 1977 as a simple file system for floppy disks. Over
the years, it evolved into various versions like FAT12, FAT16, and FAT32 to accommodate larger storage
devices.
Structure: The File Allocation Table (FAT) has a simple and straightforward structure. It consists of a
sequence of entries, with each entry representing a cluster on the disk. A cluster is a group of contiguous
sectors, which is the smallest unit of disk space that can be allocated to a file. Each entry in the FAT
contains information about the status of the corresponding cluster, such as whether it is free or allocated
to a file. The entries also contain pointers to the next cluster in a file, allowing the FAT to keep track of
the sequence of clusters that make up a file. The first entry in the FAT is reserved for the root directory of
the disk, while the remaining entries are used for file and directory clusters. FAT file systems consist of
three main components: the boot sector, the file allocation table (FAT), and the root directory.
9
Linux
10
Linux
Advantages:
Simplicity: FAT is straightforward and easy to implement, making it suitable for devices with limited
processing power.
Cross-Compatibility: FAT is compatible with various operating systems, including Windows, macOS,
Linux, and many other platforms.
Disadvantages:
Limited Features: FAT lacks advanced features like journaling, file permissions, and encryption.
Limited File Size and Volume Size: Older versions of FAT (FAT16 and FAT12) have limitations on file
and volume sizes.
Poor Reliability: FAT file systems are more prone to data corruption and fragmentation, which can lead
to data loss. 11
Linux
Use Cases:
FAT file systems are commonly used in USB drives, memory cards, and other portable storage devices due
to their compatibility with various devices and operating systems. However, FAT32 is still used for small
partitions where simplicity and compatibility are more important than advanced features.
FAT16 was the next version of the FAT file system, which was introduced in 1984 with the release of MS-
DOS 3.0. It supports larger disks than FAT12, with a maximum size of 2GB and a cluster size of up to
64KB. FAT16 is still used on some devices, but it is not as common as it used to be.
FAT32 is the most recent version of the FAT file system, which was introduced in 1996 with the release of
Windows 95 OSR2. It was designed to support larger disks than FAT16, with a maximum size of 2TB and
a cluster size of up to 32KB. FAT32 is still widely used today, particularly on removable storage devices
such as USB drives and SD cards. 12
Linux
13
Linux
History: NTFS was introduced by Microsoft in 1993 as a replacement for the aging FAT file systems. It
was designed to address the limitations of FAT and provide advanced features.
Structure:
NTFS is a more complex file system with features like journaling, file compression, encryption, and file
permissions.
It uses a Master File Table (MFT) to store metadata about files and directories, which enhances
performance and reliability.
Advantages:
Reliability: NTFS includes journaling, which helps prevent data corruption and simplifies recovery after
unexpected system crashes or power failures.
Scalability: NTFS supports large file sizes and volumes, making it suitable for modern storage needs.
Advanced Features: Features like encryption, file compression, and access control make it suitable for
business and enterprise environments.
Improved Performance: The MFT structure enhances file access and storage efficiency.
14
Linux
Disadvantages:
Compatibility: NTFS is primarily used in Windows environments and may have limited compatibility with
non-Windows systems.
Overhead: NTFS's advanced features can consume more storage space and system resources compared to
simpler file systems.
Use Cases: NTFS is the default file system for modern Windows operating systems and is widely used in
corporate environments, servers, and personal computers.
15
Linux
Structure:
EXT file systems use block groups to organize data efficiently and keep track of file metadata.
They support features like journaling, which improves data integrity and recovery.
Advantages:
Performance: EXT4, the most widely used version, offers excellent performance, making it suitable for
both desktop and server use.
Journaling: Journaling helps maintain file system consistency in case of unexpected shutdowns.
Extensibility: EXT4 can support very large file sizes and volumes.
Open Source: Being open source, EXT file systems are well-documented and continuously improved by
the Linux community.
16
Linux
Disadvantages:
Limited Compatibility: EXT file systems are primarily used in Linux environments and may not be easily
readable by other operating systems.
Less Advanced Features: While EXT4 is feature-rich, it may not offer the same level of advanced features
as NTFS in Windows environments.
Use Cases: EXT file systems are the default choice for most Linux distributions, making them suitable for
Linux desktops, servers, and embedded systems.
17
Linux
Collaboration: Free software culture promotes collaboration among developers and encourages the
sharing of code and knowledge. It values the collective effort of a community in creating and improving
software.
Transparency: Transparency is a key aspect, where the source code of software is openly available for
inspection. This transparency fosters trust, security, and the ability to verify the functionality of the
software.
18
Linux
2. History:
• The Birth of the Free Software Movement: The roots of free software culture can be traced back to the
1980s with the Free Software Foundation (FSF) founded by Richard Stallman. Stallman introduced the
concept of "copyleft" through the GNU General Public License (GPL), which ensured that software
released under it would always remain free and open.
• GNU Project: Stallman initiated the GNU Project, an ambitious effort to create a free and open-source
Unix-like operating system. This laid the foundation for many of the open-source tools and software
used today.
• Linux and Open Source: In the early 1990s, Linus Torvalds developed the Linux kernel, which
combined with the GNU software, created a complete and free operating system. The Linux ecosystem
became a driving force for the open-source movement, leading to the popularization of open-source
software.
• Open Source Initiative (OSI): In 1998, the OSI was founded to promote and protect open-source
software through the Open Source Definition, which provided guidelines for what constituted open-
source software.
19
Linux
3. Current Situation:
• Ubiquity of Open Source Software: Open source software has become ubiquitous across various
domains, including web development, cloud computing, data science, and more. Prominent examples
include the Apache web server, Linux distributions, Python programming language, and the Android
operating system. (Ubiquity = the fact of appearing everywhere or of being very common)
• Corporate Involvement: Many large technology companies, such as Google, Facebook, and Microsoft,
actively contribute to open source projects and release their own software as open source. This has led
to increased funding and resources for open source development.
• Licensing Models: Various open source licenses exist, such as the GPL, MIT, Apache, and BSD
licenses, each with its own set of terms and conditions for sharing and modifying code. These licenses
play a crucial role in determining how open source software can be used and distributed.
• Challenges: Despite its success, open source culture faces challenges such as sustainability (ensuring
ongoing development and maintenance), licensing disputes, and addressing diversity and inclusivity
within open source communities.
• Beyond Software: Open source principles have transcended the realm of software and are applied to
fields like open hardware, open data, and open government. The culture of openness and collaboration
extends to a broader societal context.
20