I am new to elementary OS. I usually use windows. In windows we can create batch
file which can make several command run at command prompt by single click. How to do this in elementary OS?
1 Answer
You can make shell scripts to achieve this. A shell script usually starts with #!/bin/bash
. Let's say you want to execute sudo apt update
and ls
but you don't want to type it every time. So a shell script for that is,
#!/bin/bash
sudo apt update
ls
Save it with ".sh" extension and execute sudo chmod +x file_name.sh
to give the file executable permission. Then you can execute the script by ./file_name.sh
.
Take a look here, described well in this answer at askubuntu.