13

I want know, if there is any command to run apt-get update in GUI like in the picture following:

GUI frontend of apt-get update

All i want to do is to write a script which will update the software sources through this gui manager. So that i can make it more user friendly. I need the command to do this. Please help.

3 Answers 3

8

You can't do apt-get update from the command line of the update manager.

To run the command, use

update-manager

man update-manaer gives:

     --data-dir=DATA_DIR
          Directory that contains the data files

   -c, --check-dist-upgrades
          Check if a new distribution release is available

   -d, --devel-release
          Check if upgrading to the latest devel release is possible

   -p, --proposed
          Upgrade  using  the  latest  proposed  version  of  the  release
          upgrader

   --no-focus-on-map
          Do not focus on map when starting

   --dist-upgrade
          Try to run a dist-upgrade

so you can move over by running

update-manager --dist-upgrade
1
  • 2
    Isn't the OP asking for the GUI equivalent of update, not dist-upgrade?
    – kiri
    Feb 18, 2014 at 8:30
3

I can't tell you exactly, as I'm not using a Ubuntu system at the moment, but I can tell you how to find the command.

  1. Open a terminal and run this command (source):

    xprop | awk '($1=="_NET_WM_PID(CARDINAL)") {print $3}' | xargs ps h -o cmd
    
  2. Click on a running instance of the GUI.

  3. The command used to run it should then be printed in the terminal. You may have to adapt it slightly for use in a Bash script, though.

1
  • Thanks for your help. I learnt that the window is not a programm. sub programm of synaptic/software updator. So need to find if some complete software like what i want exists.
    – Pavak Paul
    Feb 18, 2014 at 11:26
2

On ubuntu you can run this as follows:

sudo /usr/bin/update-manager

If this doesn't work, find the actual command by following what Pavak Paul said:

 xprop | awk '($1=="_NET_WM_PID(CARDINAL)") {print $3}' | xargs ps h -o cmd

Then click on running instance of update manager.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .