Lecture # 2 - Introduction to Linux

Lecture # 2 - Introduction to Linux

What is Linux? Why choose Linux? Basics of Linux.

Linux:

Linux is a free and open-source operating system kernel originally developed by Linus Torvalds in 1991. It is based on the Unix operating system and is designed to be lightweight, stable, and flexible. Linux is used in a wide variety of computing devices, from servers and mainframes to desktop computers, mobile phones, and embedded systems. One of the key features of Linux is its modularity and flexibility, allowing users to customize and configure it according to their specific needs. Additionally, Linux has a strong focus on security and stability, making it a popular choice for server environments and mission-critical systems.

Linux Logo and symbol, meaning, history, PNG, brand

Why choose Linux?

  1. Cost:

    Linux is free and open-source, meaning you don't have to pay for a license to use it. This can be particularly appealing for individuals or organizations on a tight budget.

  2. Customization:

    Linux offers a high level of customization. Users can choose from a wide variety of distributions (distros), desktop environments, and software packages to tailor the operating system to their specific needs and preferences.

  3. Security:

    Linux is known for its strong security features. Its open-source nature allows security vulnerabilities to be identified and patched quickly by the community, reducing the risk of malware and other security threats.

  4. Stability:

    Linux is renowned for its stability, especially in server environments. Many Linux distributions are designed with long-term support (LTS) releases, providing updates and security patches for several years.

  5. Performance:

Linux is often praised for its performance, particularly on older or less powerful hardware. It can run efficiently on machines with limited resources, making it a popular choice for servers, embedded systems, and older computers.

Basics of Linux:

  1. File System:

    Linux organizes files in a hierarchical structure starting from the root directory ("/"). Common directories include "/home" for user home directories, "/bin" for essential system binaries, "/etc" for system configuration files, and "/var" for variable data files.

  2. Shell:

    The shell is the command-line interface through which users interact with the Linux system. Common shells include Bash (Bourne Again SHell), which is the default on many distributions.

  3. Basic Commands:

    Users interact with the Linux system using commands. Some fundamental commands include:

    • ls: List directory contents.

    • cd: Change directory.

    • pwd: Print working directory.

    • mkdir: Make directory.

    • rm: Remove files or directories.

    • cp: Copy files or directories.

    • mv: Move or rename files or directories.

    • cat: Concatenate and display files.

    • nano or vim: Text editors for creating or editing files.

  1. File Permissions:

    Linux uses a permission system to control access to files and directories. Permissions are represented by read (r), write (w), and execute (x) for the owner, group, and others.

  2. Users and Groups:

    Linux is a multi-user system, and each user has their own username and password. Users can belong to one or more groups, which helps in managing file permissions and access control.