Day 2 : Introduction To Linux

Day 2 : Introduction To Linux

What is Linux?

Linux, like Windows and Mac, is an operating system: a kind of software that manages all your computer's parts and programs to let you surf the web or write that report you need to deliver on Monday.

Linux is an open-source operating system developed by Linus Torvalds in year 1991. It's used to run machines as powerful as supercomputers and as small as experimental wristwatches. It's compatible with a wide range of hardware and software, offering speed, reliability, and efficiency.

The operating system handles all the computation requirements to run the programs we use. It does things like:

  • Managing the processor's resources

  • Storing data you're using in the RAM (random access memory)

  • Organizing your files in long-term storage

  • Drawing the graphics you see on the screen

Each operating system has a slightly different approach to how it does these things, which gives it a set of characteristics that make it better for some use cases and not so great for others.

Flavours(Versions) of Linux

Some of the better-known Linux distributions are:

  • Ubuntu

  • SuSE

  • Debian

  • Red Hat

  • Fedora

  • Oracle Linux

  • CentOS

  • Arch Linux

  • Mandriva

The architecture of Linux:

  1. Kernel: Kernel is the core of the Linux-based operating system. It virtualizes the common hardware resources of the computer to provide each process with its virtual resources. This makes the process seem as if it is the sole process running on the machine. The kernel is also responsible for preventing and mitigating conflicts between different processes. Different types of the kernel are:

    • Monolithic Kernel

    • Hybrid kernels

    • Exo kernels

    • Micro kernels

  2. System Library: The special types of functions that are used to implement the functionality of the operating system.

  3. Shell: It is an interface to the kernel that hides the complexity of the kernel’s functions from the users. It takes commands from the user and executes the kernel’s functions.

  4. Hardware Layer: This layer consists of all peripheral devices like RAM/ HDD/ CPU etc.

  5. System Utility: It provides the functionalities of an operating system to the user.

Day 2 Task: Basics Linux command

  1. Check your present working directory

    pwd: The pwd command (print working directory) writes the full pathname of the current working directory to the standard output.

  2. List all the files or directories including hidden files

    The ls command is used to list files or directories. "ls" on its own lists all files in the current directory except for hidden files.

    ls -a: list with hidden files/directories

  1. Create a nested directory A/B/C/D/E

    mkdir command in Linux allows the user to create directories (also referred to as folders in some operating systems)

    With the help of mkdir -p command, you can create sub-directories of a directory. It will create a parent directory first if it doesn't exist. But if it already exists, then it will not print an error message and will move further to create sub-directories