Linux Basics

Linux Basics

Table of contents

No heading

No headings in the article.

History of Linux:

Linux came from a Unix family which was developed by Linus Torvalds in September 1991 when he was a student at the University of Helsinki, Finland, USA. He developed the first code of Linux 0.01 and post it in Minix newspaper on 17 September 1991, his code becomes so popular that people encouraged him to develop new code and he was led to develop new code and released the first official version of Linux, version 0.02 on October 5, 1991.

Linux is free and open-source software. It is used by 91% of the applications on the internet. It allows multi-user and multi-tasking with a powerful shell and multiple flavors ( ubuntu, fedora, CentOS, RHEL, SUSE).

Let us understand the Linux architecture and basic commands of Linux.

Linux Architecture :

Linux Architecture consists of the following components:

  1. Hardware: The hardware layer of Linux is made up of several peripheral devices such as a CPU, HDD, and RAM.

  2. Kernel: It is the heart of Linux. It connects hardware to applications/utilities.

  3. Shell: It is like a doorway where the user can interact with the kernel using Command-line Interface (CLI) to perform different tasks/operations on the system.

  4. Applications/Utilities: The system utilities or programs are used to perform a specific type of activities for example LibreOffice, Gnome, Thunderbird, etc.

Basic Commands of Linux:

  1. uname: It shows the name of the kernel (OS).

     ubuntu@ip-172-31-49-183:~$ uname Linux
    
  2. uname -r: shows the version of the kernel.

     ubuntu@ip-172-31-49-183:~$ uname -r 
     5.15.0-1028-aws ubuntu
    
  3. clear: used to clear the screen.

     ubuntu@ip-172-31-49-183:~$ clear
    
  4. cd: used for changing directory.

     ubuntu@ip-172-31-49-183:~$ cd 
     # change to the root directory  
     ubuntu@ip-172-31-49-183:~$ cd / 
     # change to the home directory 
     ubuntu@ip-172-31-49-183:/$ cd ~
    
  5. whoami: show current login user name.

     ubuntu@ip-172-31-49-183:~$ whoami 
     ubuntu
    
  6. date: shows the date and time.

     ubuntu@ip-172-31-49-183:/$ date 
     Mon Mar 27 17:03:36 UTC 2023
    
  7. history: shows the list of previously used commands

     ubuntu@ip-172-31-49-183:~$ history 
     1 clear 
     2 uname 
     3 uname -r 
     4 whoami 
     5 cd 
     6 cd / 
     7 date
    
  8. pwd: shows the present working directory.

     ubuntu@ip-172-31-49-183:~$ pwd 
     /home/ubuntu
    
  9. mkdir: make a directory

     ubuntu@ip-172-31-49-183:~$ mkdir test
    
  10. ls: list the available files and directories in the present working directory.

    ubuntu@ip-172-31-49-183:~$ ls 
    test