I made a script (name of the file is update
) to update and upgrade in one command. All it is is:
#! /bin/bash
sudo /usr/bin/apt-get update
sudo /usr/bin/apt-get upgrade
I used the full paths, as well putting this in its own directory, /home/user_name/custom_scripts
. I also made sure to designate this directory as root
, the permissions are listed as
drwxr-xr-x. 2 root root 4096 Aug 23 00:12 custom_scripts
and the executable script is:
-rwx------. 1 root root 73 Aug 23 00:12 update
I edited my path to look like this /home/user_name/custom_scripts:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
yet for some reason this won't execute if I type sudo update
. The weirdest thing is if I just try update
, I get a permission denied
exception.
I'm not really sure what's wrong.
unattended-upgrades
andapticron
instead. – hschou Aug 23 '17 at 05:57user_name
but not forsudo
. – Katu Aug 23 '17 at 07:15/etc/sudoers
. So that's what the problem was after all. – Astrum Aug 23 '17 at 07:42