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.
 
 
 

105 lines
2.4 KiB

= An Introduction to Linux !
Apostolos rootApostolos@swarmlab.io
// Metadata:
:description: Intro and Install
:keywords: Linux, apt
:data-uri:
:toc: right
:toc-title: Table of contents
:toclevels: 4
:source-highlighter: highlight
:no-header-footer:
:nofooter:
:last-update-label!:
:icons: font
:sectnums:
{empty} +
== Managing software
=== APT
WHAT IS APT?
A packaging system simply provides programs and applications for installation.
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.
==== Updating Package Database
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.
[source,bash]
----
apt-get update
----
==== Upgrading Package Database
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.
[source,bash]
----
sudo apt-get upgrade
----
==== SEARCH FOR PACKAGES WITH APT
To search for a package you can use the following command:
[source,bash]
----
apt search apache2
----
==== INSTALLING NEW PACKAGES
If you are find the name of the package you want to install, you can install it by running this command:
[source,bash]
----
apt install apache2 vlc
----
==== REMOVING INSTALLED PACKAGES
To uninstall a package from your system, you can use the following command:
[source,bash]
----
apt remove vlc
----
NOTE: 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:
[source,bash]
----
apt purge vlc
----
==== clean up any unused libraries and packages
[source,bash]
----
apt autoremove
----
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.
:hardbreaks:
{empty} +
{empty} +
{empty}
:!hardbreaks: