Day 2 - 90 DaysOfDevOps -    
  Linux fundamentals

Day 2 - 90 DaysOfDevOps - Linux fundamentals

ยท

3 min read

๐Ÿ”– Introduction -

Linux is a widely used open-source operating system. It was first released by Linus Torvalds in 1991 and has since gained popularity due to its flexibility, security, and extensive community support. There are different flavors of Linux which are given as 'Ubuntu, Debian, Fedora, CentOS, and many others.'

๐Ÿ”– Fundamental Concepts of Linux -

  1. The Terminal (Shell): In Linux, you interact with the system through a command-line interface (CLI) using a terminal emulator. The terminal runs a shell, which interprets your commands and communicates with the Linux kernel.

  2. File System Hierarchy: In Linux files are Organised hierarchically,

    starting from the root directory '/ '. It includes various common directories like 'bin, boot, dev, etc, and home'. Every user starts using the system from /home directory as the user is defined there.

  3. Users and Permissions: Linux is a multi-user system, and each user has their home directory under /home. The file permissions are represented by three sets of three characters: r (read), w (write), and x (execute). They apply to three different entities: owner, group, and others. To change permissions, use the chmod command.

  4. File Permissions: Linux uses a permission system to control access to files and directories. Use ls -l to see the permissions.

๐Ÿ”– The architecture of Linux -

Here the Application program takes the input from the user and generates an instruction to the Shell. Shell is considered as a middleware between Application and Kernel. Linux is designed using the C programming language. and it accepts instructions from the user in command line form using the terminal. So here the main purpose of Shell is to convert the Command received into the machine understanding program. then that program is executed by the kernel, it is considered as a Heart of Linux and generates the appropriate response for the user.

๐Ÿ”– Basic Commands of Linux -

  • To Check the present working Directory -> ' pwd '

  • To list the files of directory -> ' ls '

  • To redirect to home -> ' cd ~ '

  • To Create an empty file -> ' touch <filename>'

  • To create a nested Directory -> ' mkdir -p A/B/C/D/E '

  • To view the content in the file -> ' cat <filename> '

  • To view the history of commands -> ' history '

  • To remove a file -> ' rm <filename> '

  • To remove nested file -> ' rm -r <filename> '

  • To fetch starting 3 records from a file -> ' head -3 <filename> '

  • To fetch the last 3 records from a file -> ' tail -3 <filename> '

  • To list the files including hidden files also -> ' ls -la '

ย