Logo

Master Linux

The most comprehensive guide to deal with all Linux things and commands. This repo is under development, you can help us in contributing this course.


Here you can get started with Linux. This tutorial provides basic and advanced concepts of Linux, which you can learn for free. You can also help us by contributing to this repository, and also try to solve any mistakes written in the documentation.
LINUX is an operating system or a kernel distributed under an open-source license. In simple words, an operating system is software that enables the communication between computer hardware and software.

Prerequisites

There are no essential pre-requirements for this course. You can start with a very basic knowledge of Computers. But here are a few things you should keep in mind before taking this course.

Software requirements

  • Any device to read this documentation
  • A Linux Desktop OS is required such as Ubuntu, Fedora, Debian, Manjaro, openSUSE, etc. But if you are not comfortable with it, don't worry we are going to install a Linux Distro in this tutorial.

Index

Why Linux?
History
Linux Everywhere
Linux Distro
Desktop Environments
Command Line
Users and root
Package Management
Processes
File Management
Devices
System Partition
Bootloader and startup
Linux Kernel
Drivers
var and logs
Networking basics
Network sharing and config
Routing
DNS
Configurations


Why Linux?

Open Source

Linux is open-source, meaning its source code can be accessed, modified, and distributed freely by the public under the GPL license. This allows for a collaborative development process and the ability for individuals to create their own versions of the software. Unlike proprietary software, users cannot access or modify the source code.

Open-source is a defining characteristic of Linux, as it was created with the intention of allowing users to freely make modifications and improvements. The concept of open-source was central to Linus Torvalds's vision for the operating system.

Portable

Linux is a highly versatile operating system that can be found in a wide range of devices, thanks to its ability to run on various computer architectures. This portability is a key feature of Linux, it allows for easy transfer of code from one system to another. However, achieving this level of portability is not a one-time task, it requires a consistent effort in writing code that can be easily adapted to different systems.

Linus Torvalds, the creator of Linux, designed the operating system with portability in mind. He believed it was important for Linux to be supported on a wide variety of processors, which is why it still supports older Intel CPU processors.

Using Linux on various computers is also made easy with the bundled drivers included in Linux distros, which allows for use on almost any computer. Even if specific hardware like a GPU is not supported, open-source drivers can be easily installed to fix this.

Secure

Linux is known for its high level of security, as it is rarely affected by malware such as viruses and worms. This makes it a highly secure operating system, so much so that antivirus software is rarely needed or sold for Linux systems. There are several reasons for this inherent security in Linux, including its open-source nature, which allows for a large community of developers to review and improve the code, making it harder for malware to infiltrate the system.

Security has been a fundamental aspect of the Linux operating system from its inception, with each user isolated from others, requiring a password and user ID for access. Additionally, users have limited automatic access rights, making it harder for malware to spread. The open-source format with multiple operating environments, system architectures, and components, such as different email clients, also makes it more difficult for malware to spread throughout the system.

Developer Friendly

Linux supports a wide range of programming languages, including C, C++, CSS, Java, JavaScript, HTML, PHP, Perl, Python, Ruby, and Vala. While there may be some issues at times, it generally provides a smooth experience for programmers. If a programming language is not specific to a particular operating system, it is likely to work on Linux. However, it is always recommended to do proper research before starting to ensure compatibility. In case of support issues, the required packages can usually be obtained from Linux's distribution repositories.

Linux also provides various useful and time-saving text editors for programmers, in addition to the basic text file option. It also allows for "Bash scripting" using Linux commands for specific programming needs.

Customization

Without question, Linux is one of the most customizable operating systems available. Unlike other operating systems that may only allow for customization of the desktop background and icon set, Linux allows users to completely replace the desktop environment if it does not meet their preferences.

Cost-effective

Linux is a cost-effective option as it is open-source, free to download, use and distribute, which can help save on software costs. It also has lower maintenance costs and can be used on servers, making it ideal for small and medium-sized businesses with limited budgets.

Community

The Linux community is large and active, consisting of users and developers from all around the world. This community is dedicated to improving and promoting the use of Linux and is a valuable resource for those who use the operating system. The community provides a wealth of knowledge and support that is available to users through various channels such as forums, mailing lists, and social media.

The community also contributes to the development and maintenance of Linux, by providing bug reports and patches, which leads to a more stable and secure operating system. As Linux is open-source, it allows developers to contribute to the code and fix bugs. This active participation by the community makes Linux a robust and reliable operating system.

The community also provides a wide range of tutorials, documentation, and other resources to help users with their specific needs. This makes it easy for users to find answers to their questions and troubleshoot any issues they may encounter.

In short, the large community of Linux is a major advantage as it provides a wealth of knowledge, support and resources to users, making it an active, reliable and stable operating system.

Terminal

The terminal, also known as the command-line interface (CLI), is a powerful feature of Linux that allows users to interact with the operating system using text-based commands. The terminal provides a lot of flexibility and automation options that can make it easier for users to perform tasks, manage files and configure the system.

One of the main advantages of the terminal is that it allows users to automate repetitive tasks by creating scripts. These scripts can be used to automate common tasks such as backups, software installations, and system maintenance. This can save a lot of time and effort for users, especially for those who perform these tasks regularly.

The terminal also allows for more advanced features such as system monitoring and performance tuning. It provides tools to monitor system resources and processes, and allows users to fine-tune the system for optimal performance. The terminal also provides tools for network management and troubleshooting, which can be particularly useful for system administrators.

In short, the terminal provides a lot of flexibility and automation options to the users, making it a powerful tool for managing, configuring, and automating tasks in Linux. It's particularly useful for advanced users and system administrators who need to perform complex tasks and manage servers.

High Stability

Linux is known for its high stability, which makes it an ideal choice for servers, workstations, and other systems that need to run for extended periods of time without interruption. This stability is achieved through a combination of factors, such as the use of a monolithic kernel, a well-structured file system, and the use of advanced memory management techniques.

One of the key factors that contribute to Linux's stability is the use of a monolithic kernel. A monolithic kernel is a single large program that contains all the necessary code to control the hardware and manage system resources. This design allows for more efficient use of system resources, which leads to a more stable operating system.

Additionally, Linux's file system is well-structured and designed to minimize the chances of data corruption. This makes it less prone to crashes and errors and ensures that data is safe and recoverable in case of a system failure.

Another aspect that contributes to the stability of Linux is that it requires minimal maintenance. Unlike other operating systems, Linux does not require regular system updates or software patches. This means that once it is installed and configured, it can run for extended periods of time without the need for maintenance.

In short, Linux is known for its high stability, which makes it an ideal choice for servers, workstations, and other systems that need to run for extended periods of time without interruption. It requires minimal maintenance, is less prone to crashes and errors and ensures data is safe and recoverable.

History of Linux

The history of Linux can be traced back to the early days of UNIX, which was developed by Ken Thompson and Dennis Ritchie at Bell Laboratories in 1969. UNIX was a proprietary operating system, but it was later rewritten in C, making it more portable and widely used.

In the 1980s, Richard Stallman, a software developer, started the GNU (GNU is Not UNIX) project, which aimed to create a free software version of UNIX. Stallman developed the GNU General Public License (GPL), a free software license, and the GNU kernel, called Hurd, which was never completed.

In 1991, Linus Torvalds, a computer science student, was frustrated with the limitations of UNIX and decided to create his own operating system that would be open-source. He created a kernel called Linux and released it to the public. The Linux kernel was designed to be compatible with the existing GNU tools and utilities, and it quickly gained popularity among developers and users.

Over time, various Linux distributions such as Debian, Ubuntu, and Red Hat, have been developed, each with its own unique features and tools. Linux has grown from a student's project to become one of the most widely used operating systems in the world, powering everything from supercomputers to smartphones. It's now commonly used by developers, businesses, governments, and individuals due to its stability, security, and flexibility.

Linux is Everywhere

Linux can be found in a wide range of devices, from kitchen appliances to spacecraft, due to its ability to be ported to various computer architectures, making it highly versatile and adaptable.

Servers

Servers are a critical component of modern IT infrastructure, and Linux is a popular choice for servers due to its many advantages.

Linux servers are a popular choice for many IT organizations due to their stability, security, and flexibility. The wide range of web servers that run on Linux makes it a versatile platform to host various types of web applications and services.

Linux servers are used by many popular web servers, such as Apache and Nginx, which are known for their high performance, scalability, and security. These web servers are widely used to host websites and web applications, and they are compatible with a wide range of programming languages and frameworks.

Embedded systems

Embedded systems are specialized devices that perform specific functions, such as routers, set-top boxes, and other appliances. They typically have limited resources and require a small footprint and low power consumption. Linux is a popular choice for embedded systems such as routers and set-top boxes due to its small footprint, low power consumption, customizability, community support, and compatibility with a range of hardware platforms. It can run on devices with limited resources and can be tailored to meet specific requirements.

Automotive

Modern vehicles are becoming increasingly sophisticated, and they rely on advanced technology to provide a wide range of features and services. Linux is widely used in automotive applications, such as infotainment systems and advanced driver-assistance systems (ADAS), due to its many advantages such as its scalability, customizability, security, interoperability and community support. It can handle sensitive data and can be tailored to meet the specific needs of different vehicles.

Robotics

Linux is widely used in robotics and automation systems due to its customizability, interoperability, reliability, and security. The open-source nature of Linux allows for easy integration with other systems, making it a versatile choice for industrial automation.

Gaming

Linux has been used as the underlying operating system for some popular gaming consoles like the PlayStation 2 and 3. This is due to its flexibility, customizability, and compatibility with a wide range of hardware platforms. Additionally, Linux allows for easy integration with other systems and its open-source nature allows for developers to have more control over the system.

Mobile Devices

Linux is widely used in mobile devices, such as smartphones and tablets, due to its customizability, interoperability, security, scalability and community support. The Android operating system, which is based on the Linux kernel, is the most widely used mobile operating system in the world.

In Super Computers

In the past, most supercomputers ran on Unix, but over time, Linux has become the preferred operating system for these powerful machines.
According to the latest report from Top 500, all 500 of the world's fastest supercomputers now run on Linux.

Supercomputers are built for specific purposes, which require an operating system that is tailored to meet those needs. Unix, being a closed-source proprietary system, can be costly when it comes to customization. In contrast, Linux is open-source and therefore can be easily customized to suit the specific requirements of each supercomputer. Engineering teams can take advantage of the flexibility of Linux to create a customized operating system that is optimized for the specific needs of each supercomputer.

Space Programs

Linux can be found not only on Earth but also in space, including on Mars. NASA relies heavily on Linux for various purposes, such as storing data sent from satellites and telescopes and processing that data for research institutions and the general public. NASA's use of Linux and open-source software is a testament to the versatility and adaptability of the Linux kernel and its related software ecosystem.

You can also read The Advantages of Linux in Space

Linux Distributions

An operating system consists of an underlying kernel, applications, and often a graphical user interface. Linux is the kernel, and all operating systems that use it are called "Linux distributions." The term "distribution" comes from the process of sharing Linux-based OSes with other users, also known as "distributing" since the kernel and the OS are generally free.

Linux is Open Source and licensed under the GNU General Public License, which gives freedom to build Operating Systems on it. Many people have their set of requirements from an OS. Tech savvy people like to customize and tweak existing desktops. Thats why there are thoudands of Linux Distros we have.

Logo

Logo

Desktop Environment

A desktop environment is a complete ecosystem of software and resources providing a homogeneous graphical user experience.

Generally based on specific graphical widgets, configuration system, root window with desktop background, taskbar with window list and menu, icons, window manager etc. It provides a coherent visual metaphor for a user to interact with the computer.

There are many Desktop environments, that users can easily install on their systems. You can customize them your way with custom themes, widgets and other applications, available free and open source.