Day-4 of #90DaysOfDevOps -Basic Linux Shell Scripting for DevOps Engineers

Day-4 of #90DaysOfDevOps -Basic Linux Shell Scripting for DevOps Engineers

Welcome to Day-4 of the #90DaysofDevOps Challenge. Today, we will look into Kernel, Shell, and Shell Scripting. So, let's dive in !!!

What is Kernel?

A Kernel is a core of the Linux Operating System. It completely control's over everything in the system. It acts as an interface between the application and hardware.

It manages the following resources of the Linux System:

  1. File Management

  2. Process Management

  3. I/O Management

  4. Memory Management

  5. Device Management

What is Shell?

A Shell is a program that provides an interface to the user through which it can interact with Operating System. It is a command line interpreter through which the user can input simple human-readable commands through the keyboard after that command is sent to Kernel to perform the task.

There are two types of Shell:

a) Command Line Interface(CLI)

b) Graphical User Interface(GUI)

What is a Shell Script?

A Shell Script is a file containing a series of commands. The shell reads these commands and executes them one by one. The shell script has an extension .sh.

Shell Script can do the following tasks:

a) Automate Tasks

b) Customize Workflow

c) Perform System Configuration

d) Integrate Tools and Processes

What is #!/bin/bash? can we write #!/bin/sh as well?

The #!/bin/bash is called bang or shebang, it is the first line in the bash script. It indicates that the script should be interpreted using a bash shell. Bash(Bourne-Again-Shell) is a widely used shell and it is the default shell in most Linux Distribution Systems.

Yes, you can write #!/bin/sh instead of #!/bin/bash . The sh interpreter is a generic reference to the system's default shell.

Tasks:

Write a shell script to print a message.

Bash code#!/bin/sh
echo " I am following 90daysofdevopschallenge

Shell scripting opens up a world of possibilities for automation, customization, and efficient management of your systems and processes.

That's all for Day-4 of the #90DaysOfDevOps challenge. Stay tuned for Day-5 of the #90DaysOfDevOps challenge, where I'll explore advanced Linux Shell scripting for DevOps engineers with user management.

Connect with me on Twitter, Linkedin, and Github.

If you found this blog post helpful, please consider sharing it with others who might benefit from it and share your valuable feedback.