Installation files in linux

How To Install Software In Linux : An Introduction

In any operating system we need to install applications to complete our day to day tasks. In the world of Windows, every program has a simple Setup.exe or a program.zip file. On a Mac a package is a program.dmg or a program.sit file. In both the operating system you can simply click it and it will ask you some very basic configuration questions like, do you accept the licence agreement or the directory you want to install the software to. Although in Linux , It seems tough to install the programs/softwares but It’s not true .

The second package manager format is DEB, stands for Debian. Debian packages and the APT (Advanced Packagin Tool) has made advanced features that are now commonly used, like, automatic dependency resolution and signed packages. Debian packages are used by Debian/Linux, and some of the most used Linux distributions, like, Ubuntu, Linux Mint, Mepis etc. The .deb /Debian files look like this program-version-other.deb

APT For Debian based distributions, like, Ubuntu, Linux Mint etc.

The APT is the tool, commonly used to install packages, remotely from the software repository. In short it’s a simple command based tool that you use to install files/softwares. Complete command is apt-get and it’s the easiest way to install files/Softwares packages. This easy tools informs you about packages that are currently being installed and also it informs you about the packages that are available in repositories.

Источник

3 Ways to Install Deb Files on Ubuntu [& How to Remove Them Later]

This beginner article explains how to install deb packages on Ubuntu. It also shows you how to remove those deb packages afterward.

This is another article in our Ubuntu beginner series. If you’re completely new to Ubuntu, you might wonder how to install applications. The easiest way is to use the Ubuntu Software Center. Search for an application by name and install it from there. Life would be too simple if you could find all the applications in the Software Center. That’s not the case, unfortunately. Some applications are available via ‘deb’ packages. These are archived files that end with the .deb extension. You can think of .deb files as .exe files in Windows. You double-click on the .exe file and it starts the installation procedure in Windows. Deb packages are pretty much the same. You can find these deb packages in the download section of a software provider’s website. For example, if you want to install Google Chrome on Ubuntu, you can download the Chrome deb package from its website. Now the question arises, how do you install deb files? There are multiple ways of installing deb packages on Ubuntu. I’ll show them to you one by one in this tutorial.

Читайте также:  Linux malware detect установка

Installing .deb files on Ubuntu and Debian-based Linux Distributions

You can choose a GUI or command-line tool for installing a deb package. The choice is yours. Let’s go on and see how to install deb files.

Method 1: Use the default Software Center

softwareinstallfinal

The simplest method is to use the default software center in Ubuntu. There’s nothing special to do here. Simply go to the folder where you downloaded the .deb file (usually the Downloads folder) and double-click on the file. It will open the software center, where you should see the option to install the software. All you have to do is to hit the install button and enter your login password. See, it’s even simpler than installing from a .exe file on Windows, isn’t it?

Troubleshoot: Double-clicking deb file doesn’t open in the software center in Ubuntu 20.04

Deb File Install Fix Ubuntu

Double-clicking the deb file in Ubuntu 20.04 opens the file in archive manager instead of software center. This is weird but can easily be fixed. All you have to do is right-click on the deb file and go for the Open With option. Here, choose open with Software Install as the default choice.

Method 2: Use Gdebi application for installing deb packages with dependencies

gdebifinal

Again, life would be a lot simpler if things always went smoothly. But that’s not life as we know it. Now that you know .deb files can be easily installed via the Software Center, let me tell you about the dependency error that you may encounter with some packages. What happens is that a program may be dependent on another piece of software (such as libraries). When the developer is preparing the deb package for you, he/she may assume that your system already has that piece of software. But if that’s not the case and your system doesn’t have those required pieces of software, you’ll encounter the infamous ‘dependency error’. The Software Center cannot handle such errors on its own so you have to use another tool called gdebi. gdebi is a lightweight GUI application solely to install deb packages. It identifies the dependencies and tries to install these along with the .deb files. Personally, I prefer gdebi over the software center for installing deb files. It is a lightweight application so the installation seems quicker. You can read in detail about using gDebi and making it the default for installing DEB packages. You can install gdebi deb package installer from the software center or using the command below:

Method 3: Install .deb files in the command line

If you want to install deb packages in the command line, you can use either the apt command or the dpkg command. The apt command uses the dpkg command underneath it, but apt is more popular and easier to use. If you want to use the apt command for deb files, use it like this:

sudo apt install path_to_deb_file
sudo apt install ./deb_file
sudo dpkg -i path_to_deb_file

terminal

In both commands, you should replace path_to_deb_file with the path and name of the deb file you’ve downloaded. If you get a dependency error while installing the deb packages, you can use the following command to fix it:

Читайте также:  Linux work at home

How to remove deb packages

Removing a deb package isn’t a big deal, either. And no, you don’t need the original deb file you used to install the program.

Method 1: Remove deb packages using apt command

All you need is the name of the program you’ve installed and then you can use apt or dpkg to remove that program.

sudo apt remove program_name

Now, how do you find the exact program name you need to use in the remove command? The apt command has a solution for that as well. You can find the list of all installed files with the apt command, but manually going through this will be a pain. So you can use the grep command to search for your package. For example, I installed the RocketChat application in the previous section but if I want to find out the exact program name, I can use something like this:

sudo apt list --installed | grep chat

listapt

This will give me all the packages that have ‘chat’ in their name, and I can get the exact program name from there. As you can see, a program called ‘rocketchat’ is installed. Now you can use this program name with the apt remove command.

Method 2: Remove deb packages using dpkg command

chatdpkg

The output will give all the packages installed that have ‘chat’ in their names. ii in the above command output means that the package has been correctly installed. Now that you have the program name, you can use the dpkg command to remove it:

What about updating the deb packages?

Some deb packages (like Chrome) provide updates through system updates, but for most other software you’ll have to remove the existing program and install the newer version. I hope this beginner’s guide helped you install deb packages on Ubuntu. I added the removal part so that you can have better control over your installed programs.

Источник

How do I install a file in Linux?

If you use Linux for any amount of time, you’ll soon learn there are many different ways to do the same thing. This includes installing applications on a Linux machine via the command line. I have been a Linux user for roughly 25 years, and time and time again I find myself going back to the command line to install my apps.

The most common method of installing apps from the command line is through software repositories (a place where software is stored) using what’s called a package manager. All Linux apps are distributed as packages, which are nothing more than files associated with a package management system. Every Linux distribution comes with a package management system, but they are not all the same.

What is a package management system?

A package management system is comprised of sets of tools and file formats that are used together to install, update, and uninstall Linux apps. The two most common package management systems are from Red Hat and Debian. Red Hat, CentOS, and Fedora all use the rpm system (.rpm files), while Debian, Ubuntu, Mint, and Ubuntu use dpkg (.deb files). Gentoo Linux uses a system called Portage, and Arch Linux uses nothing but tarballs (.tar files). The primary difference between these systems is how they install and maintain apps.

Читайте также:  Linux создать пустые файлы

You might be wondering what’s inside an .rpm , .deb , or .tar file. You might be surprised to learn that all are nothing more than plain old archive files (like .zip ) that contain an application’s code, instructions on how to install it, dependencies (what other apps it may depend on), and where its configuration files should be placed. The software that reads and executes all of those instructions is called a package manager.

Debian, Ubuntu, Mint, and others

Debian, Ubuntu, Mint, and other Debian-based distributions all 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 is as easy as:

$ sudo apt install app_name

Uninstalling an app via apt is also super easy:

To upgrade your installed apps, you’ll first need to update the app repository:

Once finished, you can update any apps that need updating with the following:

What if you want to update only a single app? No problem.

Finally, let’s say the app you want to install is not available in the Debian repository, but it is available as a .deb download. You can install it manually using dpkg , the system that apt helps manage:

RHEL, CentOS, Fedora, Mageia, and OpenMandriva

Red Hat, its upstream project Fedora, and its «midstream» project CentOS, use the dnf package manager. It has its own syntax, and is a front-end to the RPM system. Although the syntax is different, dnf is similar to apt in the sense that the mechanisms and goals are the same. The Mageia and OpenMandriva distributions, once focused exclusively on urpmi for package management, now also includes dnf in their distributions.

The dnf package manager is the successor to the previous yum command. The yum had a long time to engrain itself in the minds and servers of users, so to avoid breaking custom scripts that have been around on users’ systems for over a decade, yum and dnf are now interchangeable (in fact, yum is now based on dnf .)

$ sudo dnf install app_name

Removing unwanted applications is just as easy.

The dnf (or yum ) command is a front-end for the RPM packaging system. If you can’t find an app in your software repository but you can find it for download directly from its vendor site, you can use dnf to manually install an .rpm file.

$ sudo dnf install ./app_name.rpm

As you can see, installing, uninstalling, and updating Linux apps from the command line isn’t hard at all. In fact, once you get used to it, you’ll find it’s faster than using desktop GUI-based management tools!

For more information on installing apps from the command line, please visit the Debian Apt wiki, the Yum cheat sheet, and the DNF wiki.

Источник

Оцените статью
Adblock
detector