0% found this document useful (0 votes)
40 views24 pages

C2. Managing Software

The document discusses Linux and open source software management. It covers topics like using package managers like APT, Synaptic and Snappy to install, update, and remove software. It also discusses compiling software from source code and using personal package archives.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views24 pages

C2. Managing Software

The document discusses Linux and open source software management. It covers topics like using package managers like APT, Synaptic and Snappy to install, update, and remove software. It also discusses compiling software from source code and using personal package archives.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

LINUX AND OPEN SOURCE SOFTWARE

CH2. 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

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to


# newer versions of the distribution.
deb http://ch.archive.ubuntu.com/ubuntu/ focal main restricted
deb-src http://ch.archive.ubuntu.com/ubuntu/ focal main restricted
#...

deb: contain binaries or precompiled packages.


deb-src: contain the source code of the packages..
http://archive.ubuntu.com/ubuntu: The URI (Uniform Resource
Identifier), a location on the Internet.
focal is the release name or version of your distribution.
main/restricted/universe/multiverse are the section names or
components.
Note: to check release code use: lsb_release -a 1-9
Working on the Command Line
➢ APT (Advanced Package Tool) is designed to
automatically find and download dependencies for
your packages.
➢ APT is used to manage software installation.
▪ $sudo apt update
▪ $sudo apt upgrade
▪ $sudo apt install mysql-server
▪ $sudo apt install mysql-server mailx
▪ $sudo apt remove firefox
▪ $sudo apt remove --purge firefox
▪ $sudo apt purge firefox
▪ $sudo apt-cache search kde
▪ $sudo apt-cache -n search ^kde
1-10
➢Adding a repository into the /etc/apt/sources.list or
/etc/apt/sources.list.d or removes an existing one
apt-add-repository [options] repository
apt-get update
apt-get install ***

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

sudo add-apt-repository ppa:ermshiperete/monodevelop


sudo apt-get update
sudo apt-get install ****
1-13
Working on the Command Line

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

An alternative way to remove an installed package from our system. It


-P OR --
completely removes every fie belonging to the specific package, including
purge
the configuration files.

--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

➢Unistall -v : Verbose output


-C DIR : Change to DIR before performing any
operations
(sudo) make uninstall --exclude : Exclude files matching
PATTERN/DIR/FILENAME 1-19
Excercises
➢Download and install Waterfox from tarball file
https://www.waterfox.net/download/

➢Download and install tarball Wine 1.9.19


https://dl.winehq.org/wine/source/1.9/wine-1.9.19.tar.bz2

Note: If you are win64-bit, it is required to configure as


./configure –enable-win64 –without-freetype
1-20
Configuration Management
➢Dotdee (.d) directory
▪ Contain configuration files
➢Ubuntu Core
▪ Ubuntu Core adds the absolute minimum of files and
code necessary for a usable Ubuntu server image to it as
a new means of managing software packages.

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

You might also like