Ch-5 Installing SW & Managing Users
Ch-5 Installing SW & Managing Users
INTRODUCTION TO LINUX
Chapter Objectives
• Understand software
installation basics
• Manage software via
the GUI
• Manage software from
the shell
• Understand User and
Group Accounts
• Add and delete Users
and Groups
Introduction
• One of the fun things about running any
operating system is the ability to expand it—for
adding in new software over time to improve your
workflow, or just for entertainment value.
• Linux has tens of thousands of software titles are
available to meet just about every need.
• Installing software under Fedora isn’t the same as
with Windows.
• With Fedora, users are afforded a lot more power
over what happens to their system, but this
comes at the expense of needing to take a little
time to understand the terminology and
techniques.
Software Installation Basics
• The first thing to happen is that the software is
compiling. This is the process of turning the source code
created by programmers into an actual file (or set of files)
that can be used on a daily basis.
• Once the program files have been compiled, there needs
to be a way they can be installed on various systems and
easily transported across the Internet. This is where
packaging comes into the equation. Therefore, the files
are usually combined into a single archive file.
• In addition, third-party system files are added to ensure
compatibility on all computers, and an extra program,
called an installer, is added so that users can quickly get
the files onto their systems.
Formats of Linux Installation
Files - I
• Source code:
Programmers write
their software in
various programming
languages, such as C
and C++, and the code
that results is known as
source code.
• Binary files: To make
source code usable, it
must be compiled into
a binary file.
Formats of Linux Installation Files -
II
• Self-installing binaries: Some larger
programs are made available as self-
installing binary files. When the file is
executed, a GUI-based installation wizard
takes you through installation.
• Package files: In this case, someone has
compiled the software files and put them
all together in a single, easily
transportable file. Package files for Fedora
end with .rpm file extensions
Package Management
System
• A well-implemented package
management system is able to
install programs, upgrade
them, and uninstall them
• It vastly reduces the amount of
work required to get new
software onto your system, and
they make maintenance tasks
easy, too.
• It is based on rpm , the RPM
Package Manager, with several
higher level tools built on top of
it, most notably PackageKit
(default gui) and yum
(command line tool).
Question for GD (3 mins)
• Explain the formats of linux installation files?
INTRODUCTION TO LINUX
Dependency Management
• One of the key features offered by any package
management system is dependency management.
• The package manager must ensure that if you install
a piece of software, any additional software it relies
on to work properly is already present on the system.
• If the software isn’t present, the package manager
must either resolve the situation automatically or ask
you what to do.
• Dependency management doesn’t just mean adding
in packages that a piece of software needs it also
means removing packages already present on your
system.
Package Management System Components
INTRODUCTION TO LINUX
SOFTWARE VERSIONS
• Because most Linux software is
open source, a curious thing
happens when it comes to
software versions.
• Rather than there being just one
“official” version of a program,
many individuals and
organizations take the source
code, compile it, and make their
own package files available for
others to use.
• The original programmer doesn’t
mind when such things happen.
In fact, the programmer
encourages such tweaking.
Managing Software via the GUI
• In Fedora 20 the default
software installer
application is now gnome-
software.
• It is ideal for installing
applications and the
applications are much
easier to browse and install.
• To get the old gnome-
packagekit app back, you
can do 'yum install gnome-
packagekit-installer’
Question for GD (3 mins)
• Discuss the various components of an rpm
file?
INTRODUCTION TO LINUX
Installing Software
• You can start Software
by going to Show
Applications.
• Gnome Software allows
you to install, remove
and update
applications and
system extensions.
• It also allows you to
update the system
using an offline update.
Searching and Installing Packages
• Sometimes, you might
not be able to find some
software where you
expect it to be. In such a
scenario, you can use
Search.
• Click Packages Search
tab and type the name of
the package.
• Packages will then list all
the packages associated
with that software.
Using Packages to Remove
Software
• If you click Package’s List tab, you’re presented
with a list of all the packages.
• From here, you can choose to view all the
packages, only the installed packages, or only the
available packages.
• A check mark next to the package name indicates
that the package is already installed on your
system.
• If you uncheck a box, the package manager marks
the package for removal.
• You will be presented with a summary of actions
that will be taken when you hit Apply Changes.
Applying Package Updates with
Pup
• Packages is available from
Show Applications.
• It lists all the package
updates that are available for
your system.
• These may be security
updates, bug fixes, and so on.
• When you launch Pup, all the
updates are selected by
default.
• There is an icon in the system
tray that keeps reminding you
of these available updates
Question for GD (3 mins)
• List the different ways to install a new
software?
INTRODUCTION TO LINUX
Managing Software from the Shell
• Two commands are available for software installation under
Fedora:
• rpm: This command has a simple syntax. It is designed to
remove software already installed or to install packages that
you’ve manually downloaded to your hard disk. rpm is aware
of dependencies and will inform you when problems arise, but
it relies on you to solve them.
• Yum: It is a command-line utility which is designed to work
with software repositories to install software. These
repositories can be online, on a CD/DVD, or on your hard disk.
Unlike rpm, yum is quite good at handling dependency issues.
When removing software, you’ll find that solutions are
automatically calculated so that all you need to do is agree or
disagree. So, you should use yum whenever possible.
DECODING PACKAGE FILENAMES
• Here’s one example:
• firefox-1.5.0.7-7.fc6.i386.rpm
INTRODUCTION TO LINUX
USING YUM TO INSTALL RPMS
• Since yum far outshines rpm in resolving
dependencies, it is best to use yum whenever
possible.
• But there might be times when a package
that you wish to install is not available
through the online repositories.
• In this case, your best bet is to install the
RPM file manually.
• The yum localinstall command can be used
to install manually downloaded RPM
packages.
Searching Using Yum
• You can use yum to search through the software
repository lists for particular software packages.
• This will search all the repositories available to yum.
• Searching is easy—just use the search command
option as below:
yum search browser
INTRODUCTION TO LINUX
Adding Installation Sources
• For the package management system
to work correctly, it needs to have
access to at least one software
repository.
• The Fedora installation program
configures yum to use its official
repositories.
• For most users, the default
repositories are all that will be
needed, but it’s easy to add others.
• Adding new software repositories is a
very simple procedure.
• You simply need to edit the repository
list in the /etc/yum.repos.d/ directory
Managing Users
• Linux was designed from the
ground up to be a multiuser system.
• When it’s deployed on huge
mainframe computers, it’s capable
of serving hundreds, if not
thousands, of users at the same
time, provided that there are
enough terminal computers for
them to log in.
• Even if you’re the only person using
your PC, you can still take advantage
of Fedora’s multiuser capabilities.
Users and Groups
• Each person who wishes to use Fedora must have a user
account.
• This will define what that user can and cannot do on the
system, with specific reference to files.
• Because Fedora is effectively one large file system, with
even hardware devices seen as individual files, this means
that user permissions lie at the heart of controlling the
entire system.
• Each user also belongs to a group.
• Groups have the same style of permissions as individual
users.
Root User
• On most Linux systems, the root user has power over the entire
system.
• Root can examine any file and configure any piece of hardware.
• Root typically belongs to its own unique group, also called root.
• Because of its power, the root user can cause a lot of accidental
damage, so it’s rare for anyone to log in as root on bootup.
• Instead, you can switch to root user temporarily from an
ordinary user account.
• You can use the su - command to inherit the root user’s
environment variables.
UIDs and GIDs
• Fedora uses a numerical system to identify users and
groups.
• These are referred to as user IDs (UIDs) and group IDs
(GIDs), respectively.
• For various reasons, under Fedora, all the GID and UID
numbers under 1000 are reserved for the system to use.
• This means that the first non-root user created on a
system during installation will probably be given a UID of
1000.
• In addition, any new groups created after installation are
numbered from 1000.
User Switcher
• The User Switcher applet is located to
the left of the Clock on the desktop.
• When creating a user account,
Fedora asks you to enter your full
name which you'll find next to the
clock.
• The User Switcher allows you to
quickly change into another user
account on your machine without
logging out.
• When you click on Switch User, you'll
be promptly dropped to the login
screen.
• Just enter the password for that user
account to log in.
Question for GD (3 mins)
• What is UID and GID?
INTRODUCTION TO LINUX
Adding and Deleting Users and Groups - I
• The easiest and quickest way
to add a new user or group is
to use the Users and Groups
tool under the System -
>Administration menu.
• To add a new user, select
System ->Administration -
>Users and Groups. This will
open the UserManager
application, once you’ve
typed in the root password.
Then click Add User.
Adding and Deleting Users and Groups - II
• The User Manager application
allows you to view, modify, add,
and delete local users and groups
in the graphical user interface.
• To start the application, either
select Applications → Other →
Users and Groups from the
Activities menu, or type system-
config-users at a shell prompt.
• You can create new users at the
command-line shell by using the
useradd command.
Adding and Changing Passwords
• On a default Fedora installation, ordinary users are able to
change their passwords at the shell. The command for any user
to change his password is simple:
• passwd
• The user will be asked to confirm his current password, and then
enter the new password twice to confirm that it has been typed
• Alternatively, by adopting superuser powers, a user can change
the password of another account:
• su -
• [Enter password]
• passwd <username>
Question for GD (3 mins)
• How to add an user?
INTRODUCTION TO LINUX
Labs
• Lab – 1 Installing Pidgin instant messaging
software
• Lab – 2 Search and install software using
Packages
• Lab – 3 Using Packages to remove software
• Lab – 4 Installing software using rpm
• Lab – 5 Installing and removing software using
yum
Labs
• Lab – 6 Adding and deleting users via GUI
• Lab – 7 Installing user-manager-program
• Lab – 8 Creating and deleting groups via GUI
• Lab – 9 Adding user and group using
command prompt
Mind Map
• Ask the students to draw a mind map to
summarize the session. (5 mins)