Introduction to Linux Shell and Shell Scripting

Introduction to Linux Shell and Shell Scripting

INTRODUCTION

If we run any significant operating system, the shell is involved in our operations. Whenever we use the terminal to run Ubuntu, Linux Mint, or any other Linux distribution, we are using the shell. In this article, we will explore Linux shells and shell scripting. But before diving into scripting, it’s important to understand some basic terminology: Kernel, Shell, and Terminal.

Linux shell scripting is a powerful tool for automating repetitive tasks, managing system operations, and enhancing productivity. It’s widely used by system administrators and developers alike.

What is Kernel?

The kernel, which is part of the operating system, manages all the functions and controls what happens in the computer. It looks after the following resources used by the Linux system –
File management
Process management
I/O management
Memory management
Device management etc.
Linus Torvalds is not responsible for the development of Linux OS; he started work with the Linux kernel only. A complete Linux system is made up of the kernel, GNU utilities and libraries, and other scripts for management and installation scripts.

What is Shell?

A shell is a user program that allows someone to use the features of an operating system. Users give human-readable commands to Shell, and Shell transforms them, so the kernel can handle them. An interpreter of command languages reads commands from keyboards or from files and then executes those commands. All activity in the shell starts when the user logs in or launches the terminal.

Introduction to Linux Shell and Shell Scripting

Shells are mainly known as museums and regular. –

Command Line Shell
Graphical shell
Command Line Shell
You can use a command line interface to access Shell. You type the commands you see (such as “cat”, “ls”) on the Terminal (in Linux/macOS) or Command Prompt (in Windows OS) and then they are executed. The result is shown on the computer screen for the user to see. Here is how a terminal appears in Ubuntu 16.4 –



Introduction to Linux Shell and Shell Scripting

In the sample, the “ls -l” is the command executed. It prints out all files in the current directory in a format that shows a list with detailed information.

It can be tough for beginners to use a command line shell because remembering numerous commands is not easy. It is very useful since it enables users to store commands in a file and run them all immediately. Because of this, any task done repeatedly can be programed to be efficient. On Windows, these files go by the name batch files, whereas on Linux and macOS they are called Shell Scripts.

Graphical Shells:

Graphical shells make it easy for people to manage applications by using the GUI, so they can open, close, move, resize or focus windows. Both Window OS and Ubuntu OS use GUI so that users do not need to learn commands to work with the system. People do not have to type commands for each task they perform. Usually, a GUI is what you get on Ubuntu.

 

Introduction to Linux Shell and Shell Scripting

For Linux systems, several shells are offered, for example – BASH (Bourne Again Shell) is the shell that most Linux users find most comfortable to work with. By default, Linux systems and macOS use it as the login shell. Untold can be set up on a Windows computer too. C shell (CS Hell) – There are many similarities in Shell’s operations and the C programming language. The Korn Shell (*KSH) influenced the POSIX Shell standard and others. All shells are intended for the same tasks, but each uses different commands and built-in functions.

What is the meaning of a terminal?

A program that gives a user an interface so that they can use the computer’s shell. So, users can enter commands and observe the results of the commands in a text format. Automating and handling complicated tasks requires large scripts that people run from the terminal.

Conclusion:

The Indian Institute of Embedded Systems (IIES) is a renowned institution that offers top-notch education and training in the field of embedded systems. With its comprehensive curriculum and experienced faculty, IIES is a leading choice for individuals aspiring to excel in this domain.