From 0e6a1ab634f39ac9ed3d06bd444a452252036d43 Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 22:37:16 +0530 Subject: [PATCH 1/9] Update README.md --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ffa121..76990b6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,8 @@ 2.5. [Conditionals](#25-conditionals) 2.6. [Loops](#26-loops) 3. [Tricks](#3-tricks) - 4. [Debugging](#4-debugging) + 4. [Debugging](#4-debugging) + 5. [Package Management](#5-package-management) # 1. Basic Operations @@ -1104,6 +1105,16 @@ bash -v scriptname bash -x scriptname ``` +# 5. Package Management +There are two types of packages available for linux systems. +* Debian Packages (.deb) +* RedHat Package Manager + +### Debian Package Management +The Debian package manager updates its package data by ```bash sudo apt update```. +After updating package information if there is any update available then run ```bash sudo apt upgrade``` to get the available update. + + ## Contribution - Report issues [How to](https://help.github.com/articles/creating-an-issue/) From d5af36abe7ddddf2ad5eefc3ebb4e345cd6b831f Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 22:45:29 +0530 Subject: [PATCH 2/9] Package Management Section Added --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 76990b6..2b1c02f 100644 --- a/README.md +++ b/README.md @@ -1110,10 +1110,20 @@ There are two types of packages available for linux systems. * Debian Packages (.deb) * RedHat Package Manager -### Debian Package Management -The Debian package manager updates its package data by ```bash sudo apt update```. +## 5.1 Debian Package Management + +### 5.1 A.Update Packages +The Debian package manager updates its package data by ```bash sudo apt update``` + +### 5.1 B.Upgrade Packages After updating package information if there is any update available then run ```bash sudo apt upgrade``` to get the available update. +### 5.1 C.Install Packages +The Debian package manager updates its package data by ```bash sudo apt install ``` + +### 5.1 D.Remove/Uninstall Packages +The Debian package manager updates its package data by ```bash sudo apt autoremove ``` + ## Contribution From 823664b3f606142e633aac6aa8f26d035dc8dcb2 Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 22:51:03 +0530 Subject: [PATCH 3/9] Changes in Package Management --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2b1c02f..61922e9 100644 --- a/README.md +++ b/README.md @@ -1112,17 +1112,17 @@ There are two types of packages available for linux systems. ## 5.1 Debian Package Management -### 5.1 A.Update Packages +### 5.1 A.`Update Packages` The Debian package manager updates its package data by ```bash sudo apt update``` -### 5.1 B.Upgrade Packages +### 5.1 B.`Upgrade Packages` After updating package information if there is any update available then run ```bash sudo apt upgrade``` to get the available update. -### 5.1 C.Install Packages -The Debian package manager updates its package data by ```bash sudo apt install ``` +### 5.1 C.`Install Package` +You can install new package by ```bash sudo apt install ``` -### 5.1 D.Remove/Uninstall Packages -The Debian package manager updates its package data by ```bash sudo apt autoremove ``` +### 5.1 D.`Remove/Uninstall Package` +To remove/uninstall package ```bash sudo apt autoremove ``` ## Contribution From 8ab3f88fce3d23a24de959e0921df43ec86c2df0 Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 22:59:03 +0530 Subject: [PATCH 4/9] More details added under package management --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 61922e9..e09fe93 100644 --- a/README.md +++ b/README.md @@ -1108,9 +1108,10 @@ bash -x scriptname # 5. Package Management There are two types of packages available for linux systems. * Debian Packages (.deb) -* RedHat Package Manager +* RedHat Package Manager (.rpm) ## 5.1 Debian Package Management +deb is the format, as well as extension of the software package format for the Debian distribution and its derivatives. ### 5.1 A.`Update Packages` The Debian package manager updates its package data by ```bash sudo apt update``` @@ -1124,6 +1125,8 @@ You can install new package by ```bash sudo apt install ``` ### 5.1 D.`Remove/Uninstall Package` To remove/uninstall package ```bash sudo apt autoremove ``` +### 5.1 D.`Install required dependecies` +Sometimes to fullfill the requirements of package you need to install its dependencies it can be done by ```bash sudo apt-get install --fix-missing``` ## Contribution From 7f8e032683be51b7e7652178c0e4ebebb4641fbf Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 23:18:15 +0530 Subject: [PATCH 5/9] RPM package management added --- README.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e09fe93..78c3117 100644 --- a/README.md +++ b/README.md @@ -1110,7 +1110,7 @@ There are two types of packages available for linux systems. * Debian Packages (.deb) * RedHat Package Manager (.rpm) -## 5.1 Debian Package Management +## 5.1 Debian Package (deb) deb is the format, as well as extension of the software package format for the Debian distribution and its derivatives. ### 5.1 A.`Update Packages` @@ -1125,8 +1125,30 @@ You can install new package by ```bash sudo apt install ``` ### 5.1 D.`Remove/Uninstall Package` To remove/uninstall package ```bash sudo apt autoremove ``` -### 5.1 D.`Install required dependecies` -Sometimes to fullfill the requirements of package you need to install its dependencies it can be done by ```bash sudo apt-get install --fix-missing``` +### 5.1 E.`Install Required Dependecies` +Sometimes to fullfill the reqirements of package you need to install its dependencies it can be done by ```bash sudo apt-get install --fix-missing``` + +### 5.1 F.`List All Installed Packages` +To list all installed packages ```bash dpkg -l``` + +## 5.2 RedHat Packages (rpm) +RPM Package Manager(RPM) (originally Red Hat Package Manager; now a recursive acronym) is a package management system. The name RPM refers to the following: the .rpm file format, files in the .rpm file format, software packaged in such files, and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base. + +### 5.2 A.`Install Package` +You can install new package by ```bash sudo rpm -ivh ``` + +### 5.1 B.`List All Installed Packages` +To list all installed packages ```bash rpm -qa ``` + +### 5.2 C.`Update Packages` +The Debian package manager updates its package data by ```bash sudo apt update``` + +### 5.2 D.`Upgrade Packages` +If we want to upgrade any RPM package “–U” (upgrade) option will be used. One of the major advantages of using this option is that it will not only upgrade the latest version of any package, but it will also maintain the backup of the older package so that in case if the newer upgraded package does not run the previously installed package can be used again. ```bash sudo rpm -Uvh ``` + +### 5.2 E.`Remove/Uninstall Package` +To remove/uninstall package ```bash sudo rpm -evv ``` + ## Contribution From cdb2b894086bd3240d4fcbf94afc4261a7821eb0 Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 23:20:45 +0530 Subject: [PATCH 6/9] typos fixed --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 78c3117..5cf3cad 100644 --- a/README.md +++ b/README.md @@ -1135,19 +1135,19 @@ To list all installed packages ```bash dpkg -l``` RPM Package Manager(RPM) (originally Red Hat Package Manager; now a recursive acronym) is a package management system. The name RPM refers to the following: the .rpm file format, files in the .rpm file format, software packaged in such files, and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base. ### 5.2 A.`Install Package` -You can install new package by ```bash sudo rpm -ivh ``` +You can install new package by ```sudo rpm -ivh ``` ### 5.1 B.`List All Installed Packages` -To list all installed packages ```bash rpm -qa ``` +To list all installed packages ```rpm -qa ``` ### 5.2 C.`Update Packages` -The Debian package manager updates its package data by ```bash sudo apt update``` +The Debian package manager updates its package data by ```sudo apt update``` ### 5.2 D.`Upgrade Packages` -If we want to upgrade any RPM package “–U” (upgrade) option will be used. One of the major advantages of using this option is that it will not only upgrade the latest version of any package, but it will also maintain the backup of the older package so that in case if the newer upgraded package does not run the previously installed package can be used again. ```bash sudo rpm -Uvh ``` +If we want to upgrade any RPM package “–U” (upgrade) option will be used. One of the major advantages of using this option is that it will not only upgrade the latest version of any package, but it will also maintain the backup of the older package so that in case if the newer upgraded package does not run the previously installed package can be used again. ```sudo rpm -Uvh ``` ### 5.2 E.`Remove/Uninstall Package` -To remove/uninstall package ```bash sudo rpm -evv ``` +To remove/uninstall package ```sudo rpm -evv ``` ## Contribution From ff0a95bad2025b35b839e91c7b648a91a4a38191 Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Thu, 13 Apr 2017 23:22:20 +0530 Subject: [PATCH 7/9] typos fixed --- README.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5cf3cad..20c8362 100644 --- a/README.md +++ b/README.md @@ -1140,13 +1140,10 @@ You can install new package by ```sudo rpm -ivh ``` ### 5.1 B.`List All Installed Packages` To list all installed packages ```rpm -qa ``` -### 5.2 C.`Update Packages` -The Debian package manager updates its package data by ```sudo apt update``` - -### 5.2 D.`Upgrade Packages` +### 5.2 C.`Upgrade Packages` If we want to upgrade any RPM package “–U” (upgrade) option will be used. One of the major advantages of using this option is that it will not only upgrade the latest version of any package, but it will also maintain the backup of the older package so that in case if the newer upgraded package does not run the previously installed package can be used again. ```sudo rpm -Uvh ``` -### 5.2 E.`Remove/Uninstall Package` +### 5.2 D.`Remove/Uninstall Package` To remove/uninstall package ```sudo rpm -evv ``` From 4b1873f130d67b1336ecf0d4d4ec06e062ea58cf Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Fri, 14 Apr 2017 00:48:44 +0530 Subject: [PATCH 8/9] changes made according suggestions --- README.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 20c8362..2e9844b 100644 --- a/README.md +++ b/README.md @@ -1110,42 +1110,53 @@ There are two types of packages available for linux systems. * Debian Packages (.deb) * RedHat Package Manager (.rpm) +The deb and rpm are majorly used in many linux distributions. there are some linux distributions don't use these types of packages (like Arch Linux for instance). + +The ```apt``` command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system. + +dpkg is the software at the base of the package management system in the free operating system Debian and its numerous derivatives. dpkg is used to install, remove, and provide information about .deb packages. + ## 5.1 Debian Package (deb) deb is the format, as well as extension of the software package format for the Debian distribution and its derivatives. ### 5.1 A.`Update Packages` -The Debian package manager updates its package data by ```bash sudo apt update``` +The Debian package manager updates its package data by ```apt update``` ### 5.1 B.`Upgrade Packages` -After updating package information if there is any update available then run ```bash sudo apt upgrade``` to get the available update. +After updating package information if there is any update available then run ```apt upgrade``` to get the available update. ### 5.1 C.`Install Package` -You can install new package by ```bash sudo apt install ``` +You can install new package by ```apt install ``` ### 5.1 D.`Remove/Uninstall Package` -To remove/uninstall package ```bash sudo apt autoremove ``` +To remove/uninstall package ```apt autoremove ``` ### 5.1 E.`Install Required Dependecies` -Sometimes to fullfill the reqirements of package you need to install its dependencies it can be done by ```bash sudo apt-get install --fix-missing``` +Sometimes to fullfill the reqirements of package you need to install its dependencies it can be done by ```apt-get install --fix-missing``` ### 5.1 F.`List All Installed Packages` -To list all installed packages ```bash dpkg -l``` +To list all installed packages ```dpkg -l``` ## 5.2 RedHat Packages (rpm) RPM Package Manager(RPM) (originally Red Hat Package Manager; now a recursive acronym) is a package management system. The name RPM refers to the following: the .rpm file format, files in the .rpm file format, software packaged in such files, and the package manager program itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base. +Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. + ### 5.2 A.`Install Package` -You can install new package by ```sudo rpm -ivh ``` +You can install new package by ```rpm -ivh ``` +You can also do it by Yum ```yum install ``` ### 5.1 B.`List All Installed Packages` To list all installed packages ```rpm -qa ``` +Using Yum ```yum list installed``` ### 5.2 C.`Upgrade Packages` -If we want to upgrade any RPM package “–U” (upgrade) option will be used. One of the major advantages of using this option is that it will not only upgrade the latest version of any package, but it will also maintain the backup of the older package so that in case if the newer upgraded package does not run the previously installed package can be used again. ```sudo rpm -Uvh ``` +If we want to upgrade any RPM package “–U” (upgrade) option will be used. One of the major advantages of using this option is that it will not only upgrade the latest version of any package, but it will also maintain the backup of the older package so that in case if the newer upgraded package does not run the previously installed package can be used again. ```rpm -Uvh ``` +Using Yum package manager ```yum update ``` ### 5.2 D.`Remove/Uninstall Package` -To remove/uninstall package ```sudo rpm -evv ``` - +To remove/uninstall package ```rpm -evv ``` +With Yum ```yum remove ``` ## Contribution From 92824991a929bb93b44f523a7177d35d44d525f9 Mon Sep 17 00:00:00 2001 From: SHARAD SHINDE Date: Fri, 14 Apr 2017 19:11:24 +0530 Subject: [PATCH 9/9] typos fixed --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2e9844b..c4b96ca 100644 --- a/README.md +++ b/README.md @@ -1110,7 +1110,7 @@ There are two types of packages available for linux systems. * Debian Packages (.deb) * RedHat Package Manager (.rpm) -The deb and rpm are majorly used in many linux distributions. there are some linux distributions don't use these types of packages (like Arch Linux for instance). +The deb and rpm are majorly used in many linux distributions, but there are many other linux distributions which don't use these types of packages (like Arch Linux for instance). The ```apt``` command is a powerful command-line tool, which works with Ubuntu's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire Ubuntu system. @@ -1132,7 +1132,7 @@ You can install new package by ```apt install ``` To remove/uninstall package ```apt autoremove ``` ### 5.1 E.`Install Required Dependecies` -Sometimes to fullfill the reqirements of package you need to install its dependencies it can be done by ```apt-get install --fix-missing``` +Sometimes to fullfill the requirements of package you need to install its dependencies it can be done by ```apt-get install --fix-missing``` ### 5.1 F.`List All Installed Packages` To list all installed packages ```dpkg -l```