Basics of Linux

Pratibha YedlePratibha Yedle
3 min read

History of Linux

Linux came from a Unix family, Linux is a free and open-source software operating system, which was developed by Linus Torvalds in September 1991. In 1991, when Linus Torvalds was a student at the University of Helsinki, Finland, USA He developed the first code of Linux 0.01 and post it on Minix Newsgroup on 17 Sep 1991, his code become so popular people encouraged him to develop new code and he was lead to develop new code and release the first official version of Linux Version 0.002 on 5th Oct 1991. Today many years passed and Linux become one of the most popular operating Systems.

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: Isthe special types of functions that are used to implement the functionality of the operating system.

  3. Shell: It is an interface to the kernel which 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 all peripheral devices like RAM/ HDD/ CPU etc.

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

Advantages of Linux:

  • The main advantage of Linux, is it is an open-source operating system.

  • The software updates in Linux are easy and frequent.

  • Linux is freely available to use on the internet.

  • In terms of security, Linux is more secure than any other operating system.

  • It has large community support.

  • It maintain the privacy of the user.

  • The performance of the Linux system is much higher than other operating systems. It allows a large number of people to work at the same time and it handles them efficiently.

Basic Commands In Linux:

Listing commands

ls option_flag arguments --> list the subdirectories and files avaliable in the present directory

Examples:

  • ls -l--> list the files and directories in long list format with extra information

  • ls -a --> list all including hidden files and directory

  • ls *.sh --> list all the files having .sh extension.

  • ls -i --> list the files and directories with index numbers in inodes

  • ls -d */ --> list only directories.(we can also specify a pattern)

Directory commands

  • pwd --> print work directory. Gives the present working directory.

  • cd path_to_directory --> change the directory to the provided path

  • cd ~ or just cd --> change directory to the home directory

  • cd - --> Go to the last working directory.

  • cd .. --> change directory to one step back.

  • cd ../.. --> Change directory to 2 levels back.

  • mkdir directoryName --> to make a directory in a specific location

Examples:

  • pwd --> print work directory. Gives the present working directory.

  • cd path_to_directory --> change the directory to the provided path

  • cd ~ or just cd --> change directory to the home directory

  • cd - --> Go to the last working directory.

  • cd .. --> change directory to one step back.

  • cd ../.. --> Change directory to 2 levels back.

  • mkdir directoryName --> to make a directory in a specific location

Examples:

mkdir newFolder # make a new folder 'newFolder'

mkdir .NewFolder # make a hidden directory (also . before a file to make it hidden)

mkdir A B C D #make multiple directories at the same time

mkdir /home/user/Mydirectory # make a new folder in a specific location

mkdir -p A/B/C/D # make a nested directory

0
Subscribe to my newsletter

Read articles from Pratibha Yedle directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pratibha Yedle
Pratibha Yedle