How to write a bash script in linux?
To write a bash script in Linux, follow these steps:

1. Open a text editor such as Nano, Vim, or Emacs.

2. Start the script with the shebang line that specifies the interpreter to use, in this case, bash. For example:
```bash
#!/bin/bash
```

3. Add your commands to the script, one per line. For example:
```bash
echo Hello, World!
ls -l
```

4. Save the file with a .sh extension, such as myscript.sh.

5. Set the execute permission on the script file using the chmod command. For example:
```bash
chmod +x myscript.sh
```

6. Run the script by typing its filename in the terminal. For example:
```bash
./myscript.sh
```

Your script will execute the commands you have specified in the file, and any output will be displayed in the terminal.