Table of Contents
Several ways to install software on Linux
Home Operation and Maintenance Linux Operation and Maintenance What are the ways to install software in Linux?

What are the ways to install software in Linux?

May 11, 2022 pm 04:24 PM
linux

Installation method: 1. rpm method, download the software package to the specified directory, and execute the "rpm -ivh package name" command in the directory. 2. In deb mode, download the software package and execute the "dpkg -i package name" command. 3. In yum mode, confirm normal networking, execute the "yum install package name" command, etc.

What are the ways to install software in Linux?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

Several ways to install software on Linux

1. Steps to install rpm package:

1. Find the corresponding software package, such as soft.version.rpm, and download it to a directory on the local machine;

2. Open a terminal and su - to become the root user;

3. Enter the directory where the package is located

cd 目录名
Copy after login
Copy after login

4. Execute the installation command

rpm -ivh 包名
Copy after login

Detailed introduction:

1. Installation:

I only need one simple sentence to finish. Execute: rpm –ivh rpm package name More advanced

2. Uninstall:

I also only need a simple sentence to finish. Execution: rpm –e software name

But it should be noted that the software name is used later, not the software package name.

For example, to install the package software-1.2.3-1.i386.rpm, you should execute: rpm –ivh software-1.2.3-1.i386.rpm When uninstalling, you should execute: rpm –e software.

In addition, Linux also provides graphical RPM tools such as GnoRPM and kpackage, making the whole process easier.

2. Installation using yum: (Install rpm package)

rpm is a software package name for Linux, ending with .rmp. The syntax when installing is: rpm -ivh package name. A big disadvantage of the rpm package installation is that the files are too interrelated. Sometimes, installing a software requires installing many other software packages, which is very troublesome.

Therefore, Red Hat Little Red Hat developed the yum installation method. It can completely solve this correlation problem. It is very convenient. You only need to configure two files to install. The installation method is: yum install software package name. yum is not a package, but a software for installing packages

Simply put: rpm can only install rpm packages that have been downloaded to the local machine; yum can download and install rpm packages online, and can update the system. It can also automatically handle dependency issues between packages, which the rpm tool does not have.

Steps:

1. When using yum to install software, you must first determine whether the server can be connected to the Internet normally. If it cannot be connected to the Internet normally, you cannot use yum. Installation

What are the ways to install software in Linux?

#2. When the Internet connection is confirmed, you can install it directly with yum. The syntax isyum install software package name; If the software package name is too long If so, you can directly press the tab key twice and the relevant software will automatically be listed, and then you can install it, as shown below

What are the ways to install software in Linux?

3. deb package installation method Steps:

1. Find the corresponding software package, such as soft.version.deb, and download it to a directory on your machine;

2. Open a terminal and su -Become the root user;

3. Enter the directory where the package is located

cd 目录名
Copy after login
Copy after login

4. Execute the installation command

dpkg -i 包名
Copy after login

Detailed introduction: This is a package manager provided by Debian Linux, which is very similar to RPM.

But because RPM appeared earlier, it is commonly seen in various versions of Linux.

The debian package manager dpkg only appears in Debina Linux, and is generally not available in other Linux versions.

1. Install

dpkg –i deb package name For example: dpkg –i software-1.2.3-1.deb

2. Uninstall

dpkg –e software name For example: dpkg –e software

3. Query: Query the software packages installed on the current system:

dpkg –l ‘*软件包名*’
Copy after login

For example: dpkg – l '*software*'

4. Installation method of tar.gz source code package:

1. Find the corresponding software Package, such as soft.tar.gz, download to a directory on the local machine;

2. Open a terminal, su - to become the root user;

3. cd where soft.tar.gz is located Directory;

4, tar -xzvf soft.tar.gz //Generally, a soft directory will be generated

5, cd soft

6, ./configure

7, make

8, make install

Detailed introduction:

1. Installation:

The entire installation process can be divided into the following steps:

1) Obtain the application software: obtain it by downloading and purchasing a CD;

2) Decompress files: Generally, tar packages will be compressed again, such as gzip, bz2, etc., so you need to decompress them first. If it is the most common gz format, you can execute: "tar –xvzf package name" to complete the decompression and unpacking work in one step. If not, use decompression software first, and then execute "tar –xvf decompressed

tar package" to unpack;

3) Read the attached INSTALL file and README file;

4) Execute the "./configure" command to prepare for compilation;

5) Execute the "make" command to compile the software;

6) Execute "make install" to complete Installation;

7) Execute "make clean" to delete the temporary files generated during installation.

Okay, you’re done. We can now run the application. But at this time, some readers will ask, how do I execute it? This is also a Linux-specific problem. In fact, generally speaking, the executable files of Linux application software will be stored in the /usr/local/bin directory! However, this is not a "one-size-fits-all" truth. The most reliable thing is to look at the INSTALL and README files of the software, which usually have instructions.

2. Uninstall:

Usually software developers rarely consider how to uninstall their own software, and tar only completes the packaging work, so there is no Provide a good uninstall method. So does that mean it can’t be uninstalled? In fact, no, there are two software that can solve this problem, namely Kinstall and Kife. They are golden partners for installing and uninstalling tar packages.

5. Installation method of tar.bz2 source code package:

#1. Find the corresponding software package, such as soft.tar.bz2, download it to a directory on this machine;

2. Open a terminal and su - to become the root user;

3. cd the directory where soft.tar.bz2 is located;

4, tar -xjvf soft.tar.bz2 //Generally, a soft directory will be generated

5, cd soft

6, ./configure

7, make

8, make install

Six, apt installation: (install deb package)

##1 , open a terminal, su - to become the root user;

2. apt-cache search soft Note: soft is the name or related information of the software you are looking for

3. If found in 2 If you have installed the software soft.version, use the apt-get install soft.version command to install the software

Note: As long as you have access to the Internet, you only need to use apt-cache search to find the software, and use apt-get install software

Detailed introduction:

apt-get is a package management tool for debian and ubuntu distributions, which is very similar to the yum tool in Red Hat. The apt-get command generally requires root privileges to execute, so it is generally followed by the sudo command example sudo apt-get xxxx

    ##apt-get install packagename - install a new software package (see aptitude below )
  • apt-get remove packagename——Uninstall an installed software package (retain the configuration file)
  • apt-get –purge remove packagename - Uninstall an installed software package (delete configuration file)
  • dpkg –force-all –purge packagename – Some software is difficult to uninstall and blocks other software You can use this for applications, but it’s a bit risky.
  • apt-get autoremove——Because apt will back up all installed or uninstalled software on the hard disk, so if you need space, you can use this command to delete the software you have deleted. Lost software.
  • apt-get autoclean - Run this command regularly to clear the .deb files of uninstalled packages. In this way, a lot of disk space can be freed up. If the need is very urgent, you can use apt-get clean to free up more space. This command will delete the .deb files of the installed software packages together.
  • apt-get clean——This command will also delete the backup of the installed software, but this will not affect the use of the software.
  • apt-get upgrade——Update all installed software packages
  • apt-get dist-upgrade——Upgrade the system to the new Version
  • apt-cache search string——Search for string in the package list
  • apt-cache showpkg pkgs——Display software packages information.
  • apt-cache stats - Check how many software are in the library
  • apt-cache dumpavail - Print the list of available software packages.
  • apt-cache show pkgs - displays package records, similar to dpkg –print-avail.
  • apt-cache pkgnames - print the names of all packages in the package list (You need to run this command regularly to ensure that your package list is up to date)
  • Simply put: dpkg can only install deb packages that have been downloaded to the local machine. apt- get can download and install deb packages online and update the system. It can also automatically handle dependency issues between packages, which is something that the dpkg tool does not have.

7. Bin file installation: If the name of the software you download is soft.bin, generally The following is an executable file. The installation method is as follows:

1. Open a terminal and su - to become the root user;

2. chmod x soft.bin

3. ./soft.bin //Run this command to install the software

Related recommendations: "Linux Video Tutorial"

The above is the detailed content of What are the ways to install software in Linux?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1664
14
PHP Tutorial
1268
29
C# Tutorial
1242
24
Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

vscode Previous Next Shortcut Key vscode Previous Next Shortcut Key Apr 15, 2025 pm 10:51 PM

VS Code One-step/Next step shortcut key usage: One-step (backward): Windows/Linux: Ctrl ←; macOS: Cmd ←Next step (forward): Windows/Linux: Ctrl →; macOS: Cmd →

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

What is the main purpose of Linux? What is the main purpose of Linux? Apr 16, 2025 am 12:19 AM

The main uses of Linux include: 1. Server operating system, 2. Embedded system, 3. Desktop operating system, 4. Development and testing environment. Linux excels in these areas, providing stability, security and efficient development tools.

How to run sublime after writing the code How to run sublime after writing the code Apr 16, 2025 am 08:51 AM

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

laravel installation code laravel installation code Apr 18, 2025 pm 12:30 PM

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

git software installation git software installation Apr 17, 2025 am 11:57 AM

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

See all articles