Custom Search

Ubuntu update command line

Here is a guide for Ubuntu update in command line. There are two two commands you need to run. The first command is sudo apt-get update command to scan for available packages to update from Ubuntu support. If the update found a security patch or software packages update, then you need to run the next command which is sudo apt-get upgrade to install the updates. You must have Internet connection to run the command.

Here are example of Ubuntu update in command line:




luzar@ubuntu:~$ sudo apt-get update
Hit http://us.archive.ubuntu.com hardy Release.gpg
Get:1 http://security.ubuntu.com hardy-security Release.
gpg [189B]Ign http://security.ubuntu.com hardy-security/main Translation-en_US
Ign http://security.ubuntu.com hardy-security/restricted Translation-en_US
Ign http://security.ubuntu.com hardy-security/universe Translation-en_US
Ign http://security.ubuntu.com hardy-security/multiverse Translation-en_US
Get:2 http://security.ubuntu.com hardy-security Release [58.5kB]
Get:3 http://security.ubuntu.com hardy-security/main Packages [67.9kB]
Ign http://us.archive.ubuntu.com hardy/main Translation-en_US
Get:4 http://security.ubuntu.com hardy-security/restricted Packages [7159B]
Ign http://us.archive.ubuntu.com hardy/restricted Translation-en_US
Get:5 http://security.ubuntu.com hardy-security/main Sources [15.2kB]
Ign http://us.archive.ubuntu.com hardy/universe Translation-en_US
Get:6 http://security.ubuntu.com hardy-security/restricted Sources [1092B]
Ign http://us.archive.ubuntu.com hardy/multiverse Translation-en_US
Get:7 http://security.ubuntu.com hardy-security/universe Packages [41.2kB]
Get:8 http://us.archive.ubuntu.com hardy-updates Release.gpg [189B]
Get:9 http://security.ubuntu.com hardy-security/universe Sources [7068B]
Ign http://us.archive.ubuntu.com hardy-updates/main Translation-en_US
Ign http://us.archive.ubuntu.com hardy-updates/restricted Translation-en_US
Ign http://us.archive.ubuntu.com hardy-updates/universe Translation-en_US
Ign http://us.archive.ubuntu.com hardy-updates/multiverse Translation-en_US
Hit http://us.archive.ubuntu.com hardy Release
Get:10 http://us.archive.ubuntu.com hardy-updates Release [58.5kB]
Get:11 http://security.ubuntu.com hardy-security/multiverse Packages [8637B]
Get:12 http://security.ubuntu.com hardy-security/multiverse Sources [14B]
Hit http://us.archive.ubuntu.com hardy/main Packages
Hit http://us.archive.ubuntu.com hardy/restricted Packages
Hit http://us.archive.ubuntu.com hardy/main Sources
Hit http://us.archive.ubuntu.com hardy/restricted Sources
Hit http://us.archive.ubuntu.com hardy/universe Packages
Hit http://us.archive.ubuntu.com hardy/universe Sources
Hit http://us.archive.ubuntu.com hardy/multiverse Packages
Hit http://us.archive.ubuntu.com hardy/multiverse Sources
Get:13 http://us.archive.ubuntu.com hardy-updates/main Packages [378kB]Get:14 http://us.archive.ubuntu.com hardy-updates/restricted Packages [7103B]Get:15 http://us.archive.ubuntu.com hardy-updates/main Sources [98.7kB]Get:16 http://us.archive.ubuntu.com hardy-updates/restricted Sources [1092B]Get:17 http://us.archive.ubuntu.com hardy-updates/universe Packages [141kB]Get:18 http://us.archive.ubuntu.com hardy-updates/universe Sources [32.6kB]Get:19 http://us.archive.ubuntu.com hardy-updates/multiverse Packages [23.8kB]Get:20 http://us.archive.ubuntu.com hardy-updates/multiverse Sources [4020B]
Fetched 953kB in 34s (27.9kB/s)Reading package lists... Done
luzar@ubuntu:~$


Running the apt-get upgrade command:


luzar@ubuntu:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
bind9 bind9-host dnsutils libbind9-30 libisc32 libisccc30 libisccfg30
linux-image-server linux-server
The following packages will be upgraded:
apt apt-utils bind9-doc cpp-4.2 eject gcc-4.2-base initramfs-tools
iproute libapache2-mod-php5 libc6 libc6-i686 libdbus-1-3 libgcc1
libldap-2.4-2 liblwres30 libpcre3 libstdc++6 libxml2
linux-image-2.6.24-19-server pciutils php5-common php5-mysql
postfix procps python2.5 python2.5-minimal sudo tzdata ufw
update-manager-core xkb-data
31 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 40.7MB of archives.After this operation, 24.6kB of additional disk space will be used.Do you want to continue [Y/n]? Y
Get:1 http://us.archive.ubuntu.com hardy-updates/main
gcc-4.2-base 4.2.4-1ubuntu3 [100kB]
Get:2 http://us.archive.ubuntu.com hardy-updates/main libgcc1 1:4.2.4-1ubuntu3 [23.3kB]
Get:3 http://us.archive.ubuntu.com hardy-updates/main cpp-4.2 4.2.4-1ubuntu3 [2486kB]
Get:4 http://us.archive.ubuntu.com hardy-updates/main libstdc++6 4.2.4-1ubuntu3 [332kB]
Get:5 http://us.archive.ubuntu.com hardy-updates/main libc6 2.7-10ubuntu4 [4307kB]12% [5 libc6 2299022/4307kB 53%] 201kB/s 2min56

1 comment:

  1. I've been running Fedora forever, so I know "yum" pretty well, and I've done plenty of Ubuntu desktop installs, but this is the first time I've actually tried to run Ubuntu server. I'm going to guess that administering it will be no more difficult than Fedora, but I'm sure there will be a bit of a learning curve..... :-(

    ReplyDelete

Please keep comment relevant and strictly no spam will be tolerated. Thank you.