{"id":79081,"date":"2026-11-17T01:54:45","date_gmt":"2026-11-17T01:54:45","guid":{"rendered":"http:\/\/bangla.sitestree.com\/?p=79081"},"modified":"2026-11-17T01:54:45","modified_gmt":"2026-11-17T01:54:45","slug":"linux-intermediate-05-packages","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=79081","title":{"rendered":"Linux Intermediate 05 \u2014 Package Managers and Repositories"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/bangla.sitestree.com\/?name=linux-course-index\">Linux course index<\/a> \u00b7 <a href=\"https:\/\/bangla.sitestree.com\/?cat=1991\">Linux Intermediate category<\/a> \u00b7 Lesson 5 of 9<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>AI disclosure<\/strong> \u2014 AI-generated content, posted as is. AI can make mistakes. This lesson draws on the linked Open Education posts and adds original explanations or lab examples where useful. The newly written explanations and examples may be freely reused. Linked source material retains its own terms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Learning goal<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Inspect installed packages and repositories before taking action, and tell a package database from a dependency resolver.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Concepts and setup<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">On Debian and Ubuntu, dpkg tracks installed packages and apt resolves dependencies from repositories. On Red Hat-family systems, rpm is the low-level package tool and dnf manages repositories and dependencies. Older posts use yum and describe historical behavior. Follow the installed release&#8217;s documentation rather than assuming their commands behave identically.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A repository is not just a folder of packages. The package manager reads repository metadata and verifies signatures according to its trust policy. The archive&#8217;s FTP-based repository demonstration is historical. Use approved repositories and do not bypass verification to make a lab work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check software provenance on Ubuntu or Debian<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>dpkg-query -W -f='${Package} ${Version}\\n' bash\napt-cache policy bash\napt-get -s install bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash 5.2.21-2ubuntu4\nbash:\n  Installed: 5.2.21-2ubuntu4\n  Candidate: 5.2.21-2ubuntu4\n0 upgraded, 0 newly installed, 0 to remove ...<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In the first command write the format exactly as displayed. The simulation plans changes but does not install packages. An available upgrade would produce a different plan. Mark the distribution, versions, and approved origin in your notes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Inspect a Red Hat-family lab instead<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>rpm -q bash\ndnf repolist\ndnf info bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Possible output<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bash-5.1.8-EXAMPLE.x86_64\nrepo id                     repo name\nbaseos                      BaseOS\nappstream                   AppStream\nInstalled Packages\nName        : bash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">EXAMPLE is a placeholder, not a release number. Repository IDs vary. dnf may refresh cache metadata. Nothing in this walkthrough installs or removes a package.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Questions only<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Quick-check questions<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Does rpm -q bash search the internet for updates?<\/li>\n\n\n<li>Why does repository trust matter even when a package name looks right?<\/li>\n\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Assessment questions<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li>Before upgrading bash, which Ubuntu command previews where a candidate comes from?<\/li>\n\n\n<li>Your Red Hat-family system does not list an expected repository. Which nonmutating checks come first?<\/li>\n\n\n<li>Why prefer a dependency resolver to installing individual local packages with rpm?<\/li>\n\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Questions and answers<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Quick-check answers<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>Does rpm -q bash search the internet for updates?<\/strong><br><strong>Answer<\/strong> \u2014 No. It queries the local RPM database.<\/li>\n\n\n<li><strong>Why does repository trust matter even when a package name looks right?<\/strong><br><strong>Answer<\/strong> \u2014 Anyone can name a package bash. Trusted signatures and repository policy help establish provenance.<\/li>\n\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Assessment answer key<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>Before upgrading bash, which Ubuntu command previews where a candidate comes from?<\/strong><br><strong>Answer<\/strong> \u2014 apt-cache policy bash shows installed and candidate versions plus origins. apt-get -s install bash previews a transaction.<\/li>\n\n\n<li><strong>Your Red Hat-family system does not list an expected repository. Which nonmutating checks come first?<\/strong><br><strong>Answer<\/strong> \u2014 Start with dnf repolist and compare expected repository IDs and enabled states with the distribution&#8217;s configured sources. Do not disable signature checks.<\/li>\n\n\n<li><strong>Why prefer a dependency resolver to installing individual local packages with rpm?<\/strong><br><strong>Answer<\/strong> \u2014 A resolver can evaluate required packages, compatible versions, and the wider transaction.<\/li>\n\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Source articles on this site<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li><a href=\"https:\/\/bangla.sitestree.com\/?p=76486\">yum upgrade and yum update<\/a><\/li>\n\n\n<li><a href=\"https:\/\/bangla.sitestree.com\/?p=76484\">Check if your yum server is working or not<\/a><\/li>\n\n\n<li><a href=\"https:\/\/bangla.sitestree.com\/?p=67586\">Create your own yum repo in Centos\/Redhat #DevOps #RHCSA<\/a><\/li>\n\n\n<li><a href=\"https:\/\/bangla.sitestree.com\/?p=69370\">How to create a RPM package in Linux #26 #RHCSA<\/a><\/li>\n\n\n<li><a href=\"https:\/\/bangla.sitestree.com\/?p=21831\">Some Ubuntu Linux Commands used in AWS platform #Unix\/Linux #RHCSA<\/a><\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Continue the course<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Previous lesson 04 \u2014 Bash Conditions, Loops, Functions, and Debugging. Next lesson 06 \u2014 Boot, Services, Logs, and Timers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/bangla.sitestree.com\/?name=linux-course-index\">Linux course index<\/a> \u00b7 <a href=\"https:\/\/bangla.sitestree.com\/?cat=1991\">Linux Intermediate category<\/a> \u00b7 Lesson 5 of 9<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Inspect installed packages and repositories before taking action, and tell a package database from a dependency resolver.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1991],"tags":[],"class_list":["post-79081","post","type-post","status-publish","format-standard","hentry","category-linux-intermediate","item-wrap"],"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":79102,"url":"http:\/\/bangla.sitestree.com\/?p=79102","url_meta":{"origin":79081,"position":0},"title":"Linux Administration Course \u2014 Start Here and Lesson Index","author":"Sayed","date":"November 17, 2026","format":false,"excerpt":"A 33-lesson Linux course from shell fundamentals to server administration, performance, and a recovery capstone.","rel":"","context":"In &quot;Linux Basics&quot;","block_context":{"text":"Linux Basics","link":"http:\/\/bangla.sitestree.com\/?cat=1990"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":79082,"url":"http:\/\/bangla.sitestree.com\/?p=79082","url_meta":{"origin":79081,"position":1},"title":"Linux Intermediate 06 \u2014 Boot, Services, Logs, and Timers","author":"Sayed","date":"November 17, 2026","format":false,"excerpt":"Trace the boot-to-service path, inspect logs, and create a timer that runs a tiny user service.","rel":"","context":"In &quot;Linux Intermediate&quot;","block_context":{"text":"Linux Intermediate","link":"http:\/\/bangla.sitestree.com\/?cat=1991"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":79083,"url":"http:\/\/bangla.sitestree.com\/?p=79083","url_meta":{"origin":79081,"position":2},"title":"Linux Intermediate 07 \u2014 IP Addresses, Routes, and Name Resolution","author":"Sayed","date":"November 17, 2026","format":false,"excerpt":"Separate the problems of link state, addressing, routing, name resolution, and listening services.","rel":"","context":"In &quot;Linux Intermediate&quot;","block_context":{"text":"Linux Intermediate","link":"http:\/\/bangla.sitestree.com\/?cat=1991"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":79080,"url":"http:\/\/bangla.sitestree.com\/?p=79080","url_meta":{"origin":79081,"position":3},"title":"Linux Intermediate 04 \u2014 Bash Conditions, Loops, Functions, and Debugging","author":"Sayed","date":"November 17, 2026","format":false,"excerpt":"Use a case statement, a function, and a loop to generate a multiplication chart and test invalid input.","rel":"","context":"In &quot;Linux Intermediate&quot;","block_context":{"text":"Linux Intermediate","link":"http:\/\/bangla.sitestree.com\/?cat=1991"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":79084,"url":"http:\/\/bangla.sitestree.com\/?p=79084","url_meta":{"origin":79081,"position":4},"title":"Linux Intermediate 08 \u2014 SSH Keys, Host Identity, and File Transfer","author":"Sayed","date":"November 17, 2026","format":false,"excerpt":"Verify an SSH host\u2019s identity, use a passphrase-protected key, and transfer a non-sensitive file.","rel":"","context":"In &quot;Linux Intermediate&quot;","block_context":{"text":"Linux Intermediate","link":"http:\/\/bangla.sitestree.com\/?cat=1991"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":79069,"url":"http:\/\/bangla.sitestree.com\/?p=79069","url_meta":{"origin":79081,"position":5},"title":"Linux Basics 01 \u2014 Linux, the Shell, and Your First Lab","author":"Sayed","date":"November 17, 2026","format":false,"excerpt":"Tell the kernel, distribution, terminal, and shell apart, then identify the system you are actually using.","rel":"","context":"In &quot;Linux Basics&quot;","block_context":{"text":"Linux Basics","link":"http:\/\/bangla.sitestree.com\/?cat=1990"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/79081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=79081"}],"version-history":[{"count":0,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/79081\/revisions"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=79081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=79081"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=79081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}