I'd like to create a bash script that I launch as normal user, ask me root password and if it's correct execute: apt update && apt upgrade && apt autoremove.
I tried different ways but unsuccesfully!
Ex I tried:
$ gedit update.bash
Code: Select all
#!bin/bash
sudo root
apt update && apt upgrade && apt autoremove
or I also tried:
Code: Select all
#!bin/bash
su - && update && apt upgrade && apt autoremove
exit
Thank you so much!!