Linux Shell Scripting || #Day 4

Linux Shell Scripting || #Day 4

  1. What is Kernel In Linux :

    The kernel is a computer program that is the core of a computer’s operating system, with complete control over everything in the system.

    The kernel is responsible for:

    • Process management for application execution.

    • Memory and I/O (input/output) management.

    • System call control (core act of Kernel).

    • Device management with the help of device drivers.

  2. What is Shell :

    A shell is a special user program that provide an interface to the user to use operating system services. Shell accepts human-readable commands from users and converts them into something which the kernel can understand. It is a command language interpreter that executes commands read from input devices such as keyboards or from files. The shell gets started when the user logs in or start the terminal.

  3. What is Linux Shell Scripting?

    A shell script is a computer program designed to be run by a linux shell, a command-line interpreter. it allows user to store commands in a file and execute them together. This way any repetitive task can be easily automated. These files are usually called batch files in Windows and Shell Scripts in Linux/macOS systems.

    EX : You can write script to start/stop node server by this you need to simply execute file.

  4. Shell is broadly classified into two categories –

    • Command Line Shell :

      Shell can be accessed by user using a command line interface

    • Graphical shell

      Graphical shells provide means for manipulating programs based on the graphical user interface (GUI).

      Ex : Window OS or Ubuntu OS can be considered as good example

  5. Shell Scripting for DevOps :

    In Devops technology shell scripting become very important because there are many automation tools out there and do we still need to learn and write shell scripts we use shell scripting along with automation tools in daily life of a devops engineer.

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

    #!/**\*bin/bash Is used to instruct the operating system to use bash as a command interpreter. Yes, we can write #!/bin/sh** to specify the “sh” shell as the interpreter.*

  7. Write a Shell Script that prints I will complete the #90DaysOofDevOps challenge

#!/bin/bash echo "I will complete the #90DaysOofDevOps challenge"

Conclusion

I hope you enjoyed this guide on learning Shell scripting for DevOps engineers.

Now I’d like to hear from you :)