Sudo without password
You can tell sudo to let you execute commands without a password.
per the most upvoted answer here
Open terminal window and type:
sudo visudo
In the bottom of the file, type the follow:
$USER ALL=(ALL) NOPASSWD: ALL
You can also make it only allow apt to work without a password for just one user, and just for apt by adding this instead of the above:
username ALL = NOPASSWD: /usr/bin/apt
replacing "username" with your username. You may have to reboot for these changes to take effect.
I would highly recommend using the single user/app solution as this will be much more secure than allowing complete use off sudo without a password for all sudoers... This could be a SERIOUS security issue, esspecially if someone gained physical access to your computer. In general, if this computer contains sensitive data, you will want to forgo any kind of passwordless sudoing.
Run command on startup
- GUi: In activities window search for "Startup" and run "Startup Applications" click the add button and create with the following command
OR
- Command Line: add following command to the end of
~/.profile
The following command will open a terminal and run update:
gnome-terminal -- bash -c "sudo apt update && sudo apt dist-upgrade; read line"
Name and comment (gui) as you wish and save it. Now when you log in, a terminal will open and run your upgrade commands. You will not need to enter a password, but you will have to confirm the upgrade.
The window will then stay open until you press enter.
Now that you have this, you might want to go to Software & Updates and disable automatic checking for updates since this new script does it for you.
