You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

165 lines
6.3 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.12">
<meta name="description" content="Intro and Install">
<meta name="keywords" content="Linux, apt">
<meta name="author" content="Apostolos rootApostolos@swarmlab.io">
<title>An Introduction to Linux !</title>
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/asciidoctor.js/1.5.9/css/asciidoctor.min.css">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/styles/github.min.css">
</head>
<body class="article toc2 toc-right">
<div id="header">
<h1>An Introduction to Linux !</h1>
<div class="details">
<span id="author" class="author">Apostolos rootApostolos@swarmlab.io</span><br>
</div>
<div id="toc" class="toc2">
<div id="toctitle">Table of contents</div>
<ul class="sectlevel1">
<li><a href="#_managing_software">1. Managing software</a>
<ul class="sectlevel2">
<li><a href="#_apt">1.1. APT</a>
<ul class="sectlevel3">
<li><a href="#_updating_package_database">1.1.1. Updating Package Database</a></li>
<li><a href="#_upgrading_package_database">1.1.2. Upgrading Package Database</a></li>
<li><a href="#_search_for_packages_with_apt">1.1.3. SEARCH FOR PACKAGES WITH APT</a></li>
<li><a href="#_installing_new_packages">1.1.4. INSTALLING NEW PACKAGES</a></li>
<li><a href="#_removing_installed_packages">1.1.5. REMOVING INSTALLED PACKAGES</a></li>
<li><a href="#_clean_up_any_unused_libraries_and_packages">1.1.6. clean up any unused libraries and packages</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph">
<p><br></p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_managing_software">1. Managing software</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_apt">1.1. APT</h3>
<div class="paragraph">
<p>WHAT IS APT?</p>
</div>
<div class="paragraph">
<p>A packaging system simply provides programs and applications for installation.</p>
</div>
<div class="paragraph">
<p>APT(Advanced Package Tool) is a command line tool that is the most efficient and preferred way of managing software from the command line for Debian and Debian based Linux distributions like Ubuntu . It manages dependencies effectively, maintains large configuration files and properly handles upgrades and downgrades to ensure system stability.</p>
</div>
<div class="sect3">
<h4 id="_updating_package_database">1.1.1. Updating Package Database</h4>
<div class="paragraph">
<p>Before commencing any operations with apt, we need to ensure that our local copy of the database is up-to-date.
Without this the system won’t know if there are newer packages available or not.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">apt-get update</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_upgrading_package_database">1.1.2. Upgrading Package Database</h4>
<div class="paragraph">
<p>Once your package database has been updated, you can now upgrade the packages with updates installed on you machine. This will update any applications, and the Ubuntu core system to the latest versions available.</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">sudo apt-get upgrade</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_search_for_packages_with_apt">1.1.3. SEARCH FOR PACKAGES WITH APT</h4>
<div class="paragraph">
<p>To search for a package you can use the following command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">apt search apache2</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_installing_new_packages">1.1.4. INSTALLING NEW PACKAGES</h4>
<div class="paragraph">
<p>If you are find the name of the package you want to install, you can install it by running this command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">apt install apache2 vlc</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_removing_installed_packages">1.1.5. REMOVING INSTALLED PACKAGES</h4>
<div class="paragraph">
<p>To uninstall a package from your system, you can use the following command:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">apt remove vlc</code></pre>
</div>
</div>
<div class="admonitionblock note">
<table>
<tr>
<td class="icon">
<i class="fa icon-note" title="Note"></i>
</td>
<td class="content">
This command removes the package but keeps the configuration files. So in case you reinstall the same package, your configuration remains the same. If you want to remove both the package and its associated configuration files, you can run this command:
</td>
</tr>
</table>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">apt purge vlc</code></pre>
</div>
</div>
</div>
<div class="sect3">
<h4 id="_clean_up_any_unused_libraries_and_packages">1.1.6. clean up any unused libraries and packages</h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight"><code class="language-bash hljs" data-lang="bash">apt autoremove</code></pre>
</div>
</div>
<div class="paragraph">
<p>This command automatically removes any packages that aren’t used or associated with any installed program. It’s a great way to clean up any unused libraries and packages you don’t need.</p>
</div>
<div class="paragraph">
<p><br>
<br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
<script>
if (!hljs.initHighlighting.called) {
hljs.initHighlighting.called = true
;[].slice.call(document.querySelectorAll('pre.highlight > code')).forEach(function (el) { hljs.highlightBlock(el) })
}
</script>
</body>
</html>