Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-28-2012, 09:02 PM   #1
Registered: Aug 2009
Posts: 40

Rep: Reputation: 15
A Script to Update Linux on boot

So i want to create a script that updates Kubuntu on boot.
So far i got:
sudo -u root sudo apt-get update && sudo -u root apt-get upgrade
Hope this looks good, if it does my next question is... Do i drop this script in /etc/init.d/ ? If not where? Thanks for your help guys.

Last edited by wakrein; 06-30-2012 at 02:01 AM.
Old 06-29-2012, 04:08 AM   #2
Registered: Oct 2010
Location: Switzerland
Posts: 84

Rep: Reputation: 9

From this site, it seems that you can just add your script to /etc/rc.local, without removing the exit 0 in the end.
Old 06-30-2012, 01:54 AM   #3
Registered: Aug 2009
Posts: 40

Original Poster
Rep: Reputation: 15
I got it! rc.local starts before kde is opperational. So i figured there must be some script i can use after KDE ititializes found it in /home/user/.kde/Autostart/. Put my auto update script there
!/bin/sh -e
sudo apt-get update && sudo apt-get -y upgrade && kdialog --msgbox "Linux Update Successful"
exit 0
-y for yes prompt i think.

I wish there was a way to inform me if it didnt work
Old 06-30-2012, 01:58 AM   #4
Registered: Mar 2010
Location: There
Distribution: Linux Mint 17.1
Posts: 237

Rep: Reputation: 46
Kubuntu doesn't have something that already checks for updates at starup? i'm sure it does.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux dual boot and update advice KarenWest Linux - Distributions 10 11-11-2011 04:28 PM
[SOLVED] Adding start up script in rcX.d --> Via update-rc SCRIPT defaults .... :-( jv2112 Linux - Newbie 6 07-04-2011 07:19 AM
Kernel update => no more boot linux COZSMIN Linux - Newbie 2 04-15-2008 03:15 PM
Shell Script: want to insert values in database when update script runs ring Programming 2 10-25-2007 11:48 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration