It is very important work for a kali Linux user because Kali Linux is a command-line operating system and we have to execute multiple commands to perform a task in Kali Linux. But real problem is that we execute commands one by one. But how much it would be worthy if we execute commands by writing them in on a file or script of bash language.
Bash or Shell Script language is default in kali Linux and its commands are also programmed in Bash. To execute multiple commands we write all the commands on a file with extension (.sh) that is the extension of bash language. Then as we will execute that file or script then all commands will run one by one very fast.
Another advantage of shell scripting is that, many commands are used again and again in kali Linux. Once we have written these commands on a file then we can use or copy, paste these commands in our other script to use again and again.
Open your text editor or code editor and type
(#!/bin/bash) on editor
Then type your all commands you want to run, each new command in new line as shown in the figure.
Then save the file with extension (.sh) for example (Kali.sh)
Shell scripting
Then open the terminal in directory where you saved file and execute the following commands as;
(chmod +777 +file name)
For Example;
(chmod +777 Kali.sh)
(sudo./+name of your script)
For Example;
(sudo ./Kali.sh)
In this as you will press enter your all commands will run one by one in no time.
Running script