PDA

View Full Version : [ubuntu] Karmic Koala: Automated Scripts in Terminal at Startup?



vince.lupe
November 28th, 2009, 05:28 PM
Hi, everyone,

Is there a way to get the terminal to script:

vince@vince-laptop:~$ sudo apt-get update
vince@vince-laptop:~$ sudo apt-get dist-upgrade
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~ [Y/n] (Yes, I'd like to upgrade)
vince@vince-laptop:~$ sudo apt-get upgrade
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~ [Y/n] (Yes, I'd like to upgrade)
vince@vince-laptop:~$ sudo apt-get autoclean
vince@vince-laptop:~$ sudo apt-get autoremove
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~ [Y/n] (Yes, I'd like to upgrade)

at startup?

I hate having to take the time to do this every time that there is an upgrade. Thank you, ya'll! God bless!

- Vince

scorp123
November 28th, 2009, 06:57 PM
The update manager should check for updates automatically? And if you don't want to be bothered about manually updating stuff you could install Ubuntu Server's "unattended-upgrades" package. It's in the repos and works on the desktop edition too and it does all the update magic all by itself.

If you still insist on adding those commands to your ~/.bashrc or ~/.profile without being asked a password, you should add yourself to the /etc/sudoers file and add those commands with the "NOPASSWD" option.

Read here:
http://ubuntuforums.org/showthread.php?p=8387254#post8387254