Package management in Linux (apt, yum, dnf, pacman)(/etc/apt/source.list.d)
Video time strip:
0:00 introduction
1:35 package managers
2:16 What is the package?
4:57 Installation using package manager
7:23 Example 1: Installation of “curl” package using “apt”
10:35 from where the package is getting installed
12:00 Where does the package get stored
15:19 /etc/apt/source.list.d
18:00 Example 2: Installation of “Google Chrome” package
Welcome back guys 😀️,
Today we will look into the topic “Package Management”.
In Linux, we have many packages like Internet browsers (Google Chrome),
text editors (vim), media players (vlc), etc.
These packages are managed by package managers.
These package managers are responsible for installing, managing, and uninstall
of packages from the system.
So, what is a package?
A package is a bundle of files that are related to the software you
want to install in your system along with some meta-data that requires
for installation of the package.
There are many ways to install a package into your system.
we will see some of them.
1. Using a package manager
2. Using a snap
3. Building from source
4. Using deb
Let’s start with package managers:
apt: for Debian/Ubuntu
yum: for CentOS/Red Hat
dnf: for Fedora
pacman: for Arch
As I am using Linux Mint which is based on Debian
I should use the “apt” package manager for installations.
let’s install a package named “curl”
command: sudo apt install curl
as I said package is a list of files. The highlighted text shows
that the package manager will read that list of files before
installation.
After that, it will look for dependencies, which means some file requires
for installation.
Note: cURL, is a command line tool that allows data to transfer
to or from the server without user interaction using the supported
libcurl library.
So, from where does this curl package get installed from?
The package is downloaded from a repository, which is a centralized
storage location for packages. Repositories are typically maintained
by the distribution or third-party sources and contain precompiled
binaries, source code, or metadata needed for installation.
Where will these packages be stored after installation?
Binary file: /usr/bin or /usr/local/bin
this location contains all the executable command files
which are in binary format.
Libraries: /usr/lib or /usr/local/lib
Configuration files: /etc
Documentation: /usr/share/ doc
When we install curl, first the package manager “apt” will look into
the repository list.
location: /etc/apt/sources.list.d
so, those are the links from where the “curl” package was installed
from.
if we want to install any package that is out of the official package
repository we need to create a new list file and provide the source
link in it.
Usually, Linux-based systems will not come with “google chrome”
so, let’s try installing that.
step 1: Download the Google Chrome signing key
wget -q -O – https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add –
step 2: setup the Chrome repository
sudo sh -c ‘echo “deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main” /etc/apt/sources.list.d/google-chrome.list’
step 3: update the package list
sudo apt update
step 4: install google chrome
sudo apt install google-chrome-stable
The Google Chrome was installed successfully.
we will see the remaining methods in the next video.
if the video is helpful
give a like, comment, and share also try to subscribe.
thank you 😇️
control + ; for imojis.
centos 7
hi bro
Looks like no one saw this video
sad momento