Linux software installation guide: Easy to master the installation method of .deb and .tar files
Core points
- How to install .deb files in Linux systems depends on the complexity of the software, and can be installed directly or through terminal commands. For example, Dropbox can be installed directly, but if prompted to decompress the file, you need to use the
cd ~/Desktop/Dropbox_deb
andsudo dpkg -i *.deb
commands in the terminal. - Installation of .tar files in Linux systems involves decompressing shell files and executing them using terminal commands. For example, installing VeraCrypt requires the use of
chmod x veracrypt-1.18-setup-console-x64
andsh ./veracrypt-1.18-setup-console-x64
commands. - To uninstall Linux programs, use the
sudo apt-get remove
command followed by the program name. For example, to uninstall Dropbox, entersudo apt-get remove dropbox
in the terminal.
This tutorial briefly explains how to use terminal commands to install programs in Linux. This tutorial uses Linux Mint 18 (Cinnamon 64-bit), but the commands provided below are suitable for other versions of Linux, such as Ubuntu. For Linux beginners, you may be familiar with the built-in software manager:
In short, the Software Manager allows for easier installation of various programs by simply searching for available programs and installing them from the Manager. For example, if the user wants to install GIMP through the Software Manager, just find the program and install it:
However, installation in Linux is usually more complicated than this, as it usually requires installing the program directly from the source code. Here I will explain how to install two common extension types that often cause headaches for Linux beginners. (It really gave me a headache when I first started using it!)
We will learn how to install Debian (.deb) and Tarball (.tar.gz) files through the terminal. In this tutorial, Dropbox and VeraCrypt will be used as examples respectively. Common Disclaimer Applicable: These two programs are for illustration purposes only and this article does not endorse or promote any particular product.
-
Install Dropbox through .deb file
The difficulty of installing .deb files varies. In other words, some programs composed of .deb files allow for direct installation, while programs containing many separate .deb files usually have to be installed through the terminal. Let's take a look at an example of Dropbox installation .deb file.
First of all, we choose the Ubuntu 64-bit version (or the one that suits your system):
Next, the system prompts us to install the software package directly:
While this particular .deb file is easy to install, in some cases we have to install the .deb file directly from the terminal. For example, the program might prompt us to unzip the .deb file to a specific location and install it from there instead of installing it directly.
Take Dropbox as an example, let's assume we are prompted to decompress the file and then install it. For illustration purposes, let's name this folder Dropbox_deb, which is stored in our download folder. In this case, we will:
a. Set our directory to the Dropbox_deb folder in the download folder:
cd ~/Desktop/Dropbox_deb
b. Use the following command to install the .deb file:
sudo dpkg -i *.deb
-
Installing VeraCrypt through .tar file
In some cases, users must install through .tar files, which is the standard source code download method in Linux. Here we install VeraCrypt through the .tar.bz2 file (as highlighted in the yellow text in the image below):
After the download is completed, the system will prompt us to unzip the shell (sh) file. In this case, we will unzip it to the desktop:
After decompressing the sh files, just execute them with the corresponding terminal commands. We see that we have four separate sh files and we will execute the veracrypt-1.18-setup-console-x64 file. Note that there is no .sh extension at the end of this file: if it has, you need to add .sh at the end of the file in your terminal.
We open the terminal, set the directory to desktop (cd ~/Desktop), and run the command as follows:
chmod +x veracrypt-1.18-setup-console-x64
sh ./veracrypt-1.18-setup-console-x64
After completing this, we will see that the program prompts us to complete the installation in the terminal:
Please note that to uninstall the program through the terminal, it can be done through the sudo apt-get remove
command. For example, if the user wants to uninstall Dropbox, it can be done by typing the following command:
sudo apt-get remove dropbox
If you are new to Linux, be sure to spend some time familiarizing yourself with the new operating system, especially when it comes to installing programs, as many programs are not automatically included in the software manager. Here we introduce the two most common types of packages that are usually installed on Linux, and the key commands you need to keep in mind when installing new programs on Linux platforms.
FAQ for installing .deb and .tar files in Linux (FAQ)
What is the main difference between .deb and .tar files?
.deb and .tar files are both compressed file types used in Linux, but they have different uses. The .deb file is a Debian package that is used to install software in a Debian-based Linux distribution such as Ubuntu. They contain compiled binaries as well as metadata, such as the name, version, and dependencies of the software. On the other hand, the .tar file is a tape archive file. They are an archive file type that can contain any number of files and directories. They are usually used to distribute the source code of the software, which can then be compiled and installed on any Linux distribution.
How to install .deb files in Linux?
To install the .deb file in Linux, you can use the dpkg command. First, use the cd command to navigate to the directory containing the .deb file. Then, install it with the following command: sudo dpkg -i filename.deb
. Replace "filename.deb" with the name of your .deb file. You may need to enter the password for the sudo command.
How to install .tar file in Linux?
Installing the .tar file in Linux includes decompressing the archive file, and then compiling and installing the software. First, navigate to the directory containing the .tar file and unzip it with the following command: tar -xvf filename.tar
. Then, navigate to the unzipped directory and compile the software using the ./configure
, make
and sudo make install
commands.
What should I do if I encounter dependency issues when installing .deb files?
If you encounter dependency issues when installing .deb files, you can use the apt-get command to resolve them. After trying to install the .deb file using dpkg, install any missing dependencies using the following command: sudo apt-get install -f
.
Can I install .deb files in a non-Debian-based Linux distribution?
Although .deb files are designed for Debian-based distributions, they can be installed in other distributions using a tool like alien that converts .deb files to formats compatible with other distributions. However, this is usually not recommended as it can cause compatibility issues.
Can I install .tar files in any Linux distribution?
Yes, the .tar file can be installed in any Linux distribution. However, this process is more complicated than installing .deb files and requires compiling the software from source.
How to delete software installed from .deb files?
To delete software installed from .deb files, you can use the dpkg command with the -r option as follows: sudo dpkg -r packagename
. Replace "packagename" with the name of the package you want to delete.
How to delete software installed from .tar file?
Removing software installed from .tar files can be more complicated because it depends on how the software is installed. If the software is installed using make install, you can try using make uninstall in the software directory. However, this only works if the software-provided Makefile contains uninstall rules.
Can I install .deb or .tar files without using the command line?
Yes, many Linux distributions provide graphical tools for installing .deb files. For example, in Ubuntu, you can double-click the .deb file to open it in the Software Center and install it from there. However, installing .tar files usually requires the command line.
What are the risks of installing .deb or .tar files from untrusted sources?
Installing .deb or .tar files from untrusted sources can pose security risks because they may contain malicious code. Always make sure you trust the source of the file and consider checking the file's checksum to verify its integrity.
All pictures remain in their original format and location.
The above is the detailed content of Quick Tip: How to Install .deb and .tar Files in Linux. For more information, please follow other related articles on the PHP Chinese website!

Stay informed about the latest tech trends with these top developer newsletters! This curated list offers something for everyone, from AI enthusiasts to seasoned backend and frontend developers. Choose your favorites and save time searching for rel

This tutorial guides you through building a serverless image processing pipeline using AWS services. We'll create a Next.js frontend deployed on an ECS Fargate cluster, interacting with an API Gateway, Lambda functions, S3 buckets, and DynamoDB. Th

This pilot program, a collaboration between the CNCF (Cloud Native Computing Foundation), Ampere Computing, Equinix Metal, and Actuated, streamlines arm64 CI/CD for CNCF GitHub projects. The initiative addresses security concerns and performance lim


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment
