Anonymous

Changes

From Open Educational Resources
2,672 bytes added ,  12:35, 18 February 2021
Line 23: Line 23:  
Ubuntu use .deb files and the dpkg package management system. There are two ways to install apps via this system. You can use the apt application to install from a repository, or you can use the dpkg app to install apps from .deb files. Let's take a look at how to do both.
 
Ubuntu use .deb files and the dpkg package management system. There are two ways to install apps via this system. You can use the apt application to install from a repository, or you can use the dpkg app to install apps from .deb files. Let's take a look at how to do both.
   −
==== Installing apps using apt : ====
   
Open terminal by pressing Ctrl+Alt+T or go to Applications → System tools  → terminal and first you check whether your application is available in the Ubuntu repository by using the below command (replace "search terms" with your package name).
 
Open terminal by pressing Ctrl+Alt+T or go to Applications → System tools  → terminal and first you check whether your application is available in the Ubuntu repository by using the below command (replace "search terms" with your package name).
 
  apt-cache search [search terms]
 
  apt-cache search [search terms]
Line 43: Line 42:  
</gallery>
 
</gallery>
 
After it finishes the installation process, a screen will look like this. <br>
 
After it finishes the installation process, a screen will look like this. <br>
[[File:terminal-install command 5.png|550px|centre]]
+
[[File:terminal-install command 5.png|550px]]
   −
=== Through Downloading packages from the website ===
+
=== Through downloading packages from the website ===
 +
When you use apt to install a package, under the hood it uses dpkg. When you install a package using apt, it first creates a list of all the dependencies and downloads it from the repository. Downloading Debian packages and install is the simplest method to install many applications.<br>
 +
First, you need to go to the official website of the package which you are looking for and download Debian file (For the purposes of demonstration, we will download and install the Google chrome deb file). To download the package, launch your Firefox web browser and navigate to the [https://www.google.com/chrome/ chrome for Linux download page]. <br>
 +
[[File:Downling deb file.png|650px]]
 +
 
 +
==== Install deb files through GUI mode ====
 +
Once you download "google-chrome-stable_current_amd64.deb" file to your computer, go to the folder where you downloaded the .deb file (usually the Downloads folder) and double click on the file. Double click on the file to open the installation window and click on the Install button and the Authenticate dialog box will open, type your administration password, press Enter key to start the installation process.
 +
<gallery mode="packed" heights="450px">
 +
File:1. opening deb with package manager .png
 +
File:2. Open app grid_ deb with package manager .png
 +
</gallery>
 +
 
 +
The installation may take some time depending on the file size and its dependencies. Once the deb package is installed, the “Install” button within the package installer window will change to “Remove”.
 +
 
 +
==== Install deb files through terminal ====
 +
When it comes to installing deb packages from the command line you have several tools. Here we are going to show using "gdebi" tools. "Gdebi" is a tool for installing local deb packages. It is not installed by default in Ubuntu, but you can install it with the following command:
 +
sudo apt install gdebi
 +
[[File:gdebi - 2 install gdebi.png|650px]] <br>
 +
Once the process complete, gdebi is ready to install any local .deb packages. Now close the terminal window
 +
To install the deb package with gdebi, go to the folder where you have downloaded the .deb file (usually the Downloads folder) and right-click on free space select "Open in terminal" this will open the terminal with your current directory.
 +
sudo gdebi [your deb file name]
 +
<gallery mode="packed" heights="450px">
 +
File:gdebi - 1 open terminal.png
 +
File:gdebi - 3 running gdebi.png
 +
</gallery>
 +
<br>
 +
Type <code>y</code> when prompted and <code>gdebi</code> will resolve and install the deb package and all its dependencies for you. The installation may take some time depending on the file size and its dependencies.<br>
 +
 
 +
That’s all, the application has been installed on your system and you can start using it.