Is possible to write some "sudo" commands with text app and save it as terminal file ?
It should allows me to run the saved commands directly batter than line by line and I can run it at any time ?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
You can create a
.sh file using any text editor. Write the commands that you want to run each on it own line, and you can
add -y to the end of the line for those that needs it, save the file with the extension
.sh, and then you can run it from terminal. See example below.
sudo -u ls /home/user/files
List the contents of the /home/user/files directory.
sudo apt install chromium-browser -y
Installs Chromium browser