Linux+: Linux Install 10 – Linux Updates When you install a version of Linux and applications, you need a way to update all of the software. Linux allows for software updates for the Operating System (OS) as well as the applications. When you install a fresh install of an OS, you want to have the system as up to date with the most recent software to help prevent errors and problems. We will look at two different types of Linux systems and with these, two different ways to perform an update. The two systems covered are the Debian and Red Hat systems. The two different ways to perform an update are through a Graphical User Interface (GUI) and the command-line. Debian First, let's look at a Debian based system using the GUI which is usually Synaptic Package Manager as shown in Figure 1. FIGURE 1 Here, you can press the Search button at the top to perform a search for needed software. For example, if you want to install the KDE Desktop Shell, you would type 'KDE' in the search box. Once the application has searched for all files pertaining to KDE they will be displayed. Then, you look through the results and select the item or items you want by selecting 'Mark for installation'. Once all items have been marked, you can select the 'Apply' button at the top. Once the Apply button is selected, the marked packages will be installed. You can also select an installed package and then select 'remove' to uninstall the package after 'Apply' is pressed. NOTE: The marked items are referred to as packages since all necessary files required by the application will also be installed. The necessary files are referred to as dependencies. Figure 1 also shows a section in the lower left side titled 'Installed (upgradeable)'. When you select this row, you will be shown all of the files that have been updated at the repository but not installed on the local system. You can select to 'Mark all upgrades' and then select the 'Apply' button to update all out of date files. Synaptic is a front-end for the command-line used in a Terminal. The command is 'apt-get' and has the following options: update – used to update the list of available files from the list of Repositories upgrade – used to upgrade all available files to a newer version dist-upgrade – performs a smart upgrade to handle dependency upgrades as well install – installs the listed packages which are typed after the word 'install' = version – specifies the version of a package remove – removes the listed packages which are typed after the word 'remove' source – downloads the source files of the packages which are typed after the word 'source' --compile - causes the source file to be compiled --download-only – the source file is not unpacked or compiled = version – specifies the version of the source file to download build-dep – installs or removes packages for the build dependency for the source files check – checks for broken dependencies clean – clears out the list of retrieved files from the repositories autoclean – similar to clean, but only removes files which are no longer available There are also optional parameters which can be used as follows: -d, --download-only – files are downloaded and not installed -f, --fixbroken – used to fix any missing dependencies -m, --ignore-missing – ignores any missing dependencies -no-download – stops files from being downloaded -q, --quiet – omit progress indicators so output can be used for logging -s, --simulate – performs a simulation with no actual downloads -y, --yes – answers all prompts with 'yes' -u, --showupgraded – shows the upgraded packages -V, --verbose-versions – shows versions of packages -b, --compile, --build – compile source packages after download --ignore-hold – holds set on packages are ignored --no-upgrade – upgrades are ignored --force-yes – all prompts are forced to be answered 'yes' --print-uris – fetched files are not installed but the uri for the location is printed --reinstall – package listed after 'reinstall' are installed again --list-cleanup – obsolete files are deleted -t, --target release – specifies the release version required --trivial-only – trivial questions are answered with 'no' --no-remove – if a package is to be removed, apt-get aborts -h, --help – shows help information -v, --version – shows version of program -c, --config-file – specifies default configuration file -o, --option – sets a configuration option Red Hat Red Hat and similar distros uses Red Hat Package Manager (RPM) files instead of Debian (DEB) files. Because of this, there is a different GUI and set of command-line options for these. For example, in Fedora, the application called Apper is used to download, update and remove files. Apper is shown in Figure 2. FIGURE 2 In Figure 2, you can see the upper section is for Installed applications and Upgrades. If you select Installed Software, you can get a list of all software currently installed. You can select individual packages and then select 'Remove'. The Updates button can be selected to show available updates. Once updates are selected, you can then press the 'Apply' button to perform the upgrades. The lower portion of Apper shows a listing of Categories which you can select to browse for applications. You may also type in a search string for finding what you are looking for in the Search box. Now, to perform the same from a terminal command-line. Instead of using the command app-get as with Debian systems, Red Hat systems use Yellowdog Updater Modified (yum). update – used to update the installed package files update-to – same as update, but specifies a version upgrade – used to upgrade all installed packages to a newer version upgrade-to – similar to upgrade, but specifies a version dist-upgrade – performs a smart upgrade to handle dependency upgrades as well install – installs the listed packages which are typed after the word 'install' check-update – checks to see if an update is available and can return a list of updates distribution-synchronization – updates all files if found and downgrades packages for those that have been removed from the repository remove, erase – removes the listed packages which are typed after the word 'remove' list – lists information about packages provides – determines which package provides specific features search – used to find a package name info – provides description information about a package clean – clears out yum cache makecache – download and use metadata for repositories groupinstall – installs a package group groupupdate – updates a package group grouplist – displays a list of all repository groups groupremove – removes all files in a group groupinfo – shows information about a group shell – enters a yum shell resolvedep – lists packages providing the specified dependencies localinstall – install a set of local rpm packages localupdate – updates files by using a local rpm reinstall – reinstalls specified package with same version downgrade – reinstalls with the highest previous version of a package deplist – creates a list of dependencies repolist – lists configurable repositories version – gives version of rpm history – shows history of previous yum transactions load-transaction – reload a save transaction check – looks over rpm database and checks for problems help – displays help information There are also optional parameters which can be used as follows: -h, --help – gives help information -y, --assumeyes – answers to all questions are yes -c, --donfig=file – specifies configuration file -q, --quiet - runs with no output -v, --verbose – displays all output -d, --debuglevel=number – sets amount of output (0-10) -e, --errorlevel=number – sets error level (0-10) --rpmverbosity=name – sets debug level info (default) critical emergency error warn debug -R, --randomwait=minutes – maximum time to wait before perfoming command -C, --cacheonly – run completely from cache information --version – yum version and all package versions --showduplicates – shows duplicate transactions --installroot=root – gives alternate installroot --enablerepo=repoidglob – enables repos by id or glob which were disabled --disablerepo=repoidglob – disables repos by id or glob --obsolete – used with update to update obsolete files -x, --exclude=package – excludes a package by name --color=always, auto, never – uses color output --disableexcludes=all, main, repoid – stops excludes for all, main config file, or by repo id --disableplugin=plugin – run with specified plugin disabled --noplugins – runs with no plugins at all --nogpgcheck – run with GPG signature check disabled --skip-broken – remove packages which are causing issues or broken --releasever=version – sets a version number as the current one, even if it is not true --setopt=option=value – sets config option for yum NOTE: My main suggestion is to try these options and remember what they do for the exam.