C2. Managing Software
C2. Managing Software
1-1
Syllabus & Text-books
1) Matthew Helmke, Ubuntu Linux unleashed, Pearson, 2021 Edition.
2) Daniel J. Barrett, Linux pocket guide, 3rd edition, O’Reilly, June 2016.
1-2
Main contents
➢Ubuntu Software
➢Using Synaptic for Software Management
➢Staying Up to Date
➢Working on the Command Line
➢Compiling Software from Source
➢Configuration Management
➢Using the Snappy Package Manager
1-3
Ubuntu Software
➢The package and executable program is named
Ubuntu-software.
➢Ubuntu Software enables you to easily select and
install a large array of applications.
1-4
Using Synaptic for Software Management
➢Ubuntu Software works just fine for adding and
removing applications. To install something
specific - such as a library - you need to use the
command line or Synaptic.
1-5
Using Synaptic for Software Management
➢ Synaptic options:
▪ unmark: if you have marked the package for installation,
upgrade, or one of the other options, this option removes that
mark.
▪ Mark for installation: Click this option to add this package to the
list that will be installed.
▪ Mark for Re-installation: If you have some software already
installed, but for some reason it’s not working, click this option
to reinstall it from scratch.
▪ Mark for upgrade: If the software has updates available, select
this option to download and install them.
▪ Mark for removal: Select this option to delete the selected
package from you system.
▪ Mark for Complete Removal: Select this option to delete the
selected package from your system and also remove any
configuration files and purge everything from the system.
1-6
Staying Up to Date
➢Software Updater automatically downloads the list
of updates available and checks them all in the list
it shows.
1-7
Repository
➢ Ubuntu distinguishes between software that is "free"
and software that is not free. The four main
repositories are:
▪ Main - Canonical-supported free and open-source software.
▪ Universe - Community-maintained free and open-source
software.
▪ Restricted - Proprietary drivers for devices.
▪ Multiverse - Software restricted by copyright or legal
issues.
➢ Ubuntu uses apt for package management. Apt stores
a list of repositories or software channels in the file
▪ /etc/apt/sources.list
1-8
/etc/apt/sources.list
# sources.list
#deb cdrom:[Ubuntu 13.10 _Saucy Salamander_ - Release i386 (20131016.1)]/ saucy main restricted
E.g.
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ focal universe multiverse"
sudo add-apt-repository "deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe multiverse"
1-11
Excercises
➢Using apt tool
▪ Install: chrome
▪ Re-install: thunderbird
• Add new mail account
• Send a mail to [email protected]
• Content: installation steps (including captured screen)
1-12
Personal Package Archives (PPA)
➢Personal Package Archives (PPAs) are a kind of
repository. Developers create them in order to
distribute their software.
➢In order to add a PPA you need its "location"
ppa:[username]/[ppaname]
E.g.
https://launchpad.net/~ermshiperete/+archive/ubuntu/monodevelop
1-14
Exercises
1. Install the synaptic app using apt-get install
▪ Check apps installed from Launchpad PPA (LP-PPA)
2. Install y-ppa-manager from
https://launchpad.net/~webupd8team/+archive/ubuntu/y-ppa-manager
▪ Check all apps from added PPA by synaptic
▪ Check the content of /etc/apt/sources.list after adding
PPA repo
1-15
Package manager dpkg for Debian
➢The program dpkg can be used to install or remove
programs, list them or specific information on
them
➢dpkg is the Linux Debian packages manager. When
apt or apt-get are used they invoke the dpkg
program to install or remove applications while
including additional functions dpkg doesn’t like
dependencies resolution.
1-16
Package manager dpkg for Debian
Option Function
-i OR --
Install a package using the dpkg command.
install
-r OR --
Remove an installed package from our system.
remove
--update- Use information of the dpkg command about available packages in its
avail repositories.
--merge- Merge the information of the dpkg command about available packages in its
avail repositories with previously available information.
--help Display the help page for the dpkg command and exit.
1-17
➢Install multiarch-support from
https://packages.ubuntu.com/
1-18
Compiling Software from Source
➢Compiling from a Tarball
➢Configure ./configure
➢Compile the software
-c : Create a new archive
make -v : Verbose output
-f file.tar.gz : Use archive file
➢Install -z : Filter the archive through gzip
-j : Filter the archive through bzip2
(sudo) make install -x : Extract files from an archive
-t : List the contents of an archive
1-21
Using the Snappy Package Manager
➢To show a list of snap packages that are available
to be installed, use the following:
▪ $snap find
➢To find a specific package in the list:
▪ $snap find searchterm
➢To install a snap package, use the following:
▪ $sudo snap install packagename
➢To show a list of snap packages that are currently
installed, use the following:
▪ $snap list
1-22
Using the Snappy Package Manager
➢To update a snap package, use the following:
▪ $sudo snap refresh packagename
➢To remove a snap package, use the following:
▪ $sudo snap remove packagename
➢To display a list of changes, such as when snaps
were installed, updated, or removed, use the
following:
▪ $snap changes
1-23
1-24