How to install and Uninstall Linux software

Source: Internet
Author: User

If you are a Linux User, are you very fond of its practicality and simplicity. However, installation and uninstallation of Linux software has been a problem for many new users. How can we install and Uninstall Linux software?

In Windows, we can use the installation and uninstallation programs that come with the software or "Add/delete programs" in the control panel. Similar to this, there are powerful software installation and uninstallation tool package manager in different Linux releases. For example, the RedHat/Fedora series is known as the RPM manager and the graphical interface Package Manager. It can be used to establish, install, query, update, and uninstall software.

Software Installation
Linux software is installed in two different ways. The first is a compressed package named xxx.tar.gz, and the other is an installation package named xxx. rpm. Most of the software released in the first method is sent in the source code form, and the second method is directly sent in binary form.

For the first method, the installation method is as follows:

1. First, copy the installation file to a compilation directory. We recommend that you put it under/usr/src.

# Cp xxx.tar.gz/usr/src/

2. Because the file is compressed and packaged, decompress it. Command:

# Tar xvzf filename.tar.gz

If the file is in the filename.tar.bz2 format, run the following command to decompress the file:

# Tar jxvf filename.tar.bz2

3. After executing this command, extract the installation file to the current directory by path. Run the ls command to view the decompressed file. Generally, files generated after decompression are named "INSTALL" or "README. This file is a plain text file that describes the installation method of the software package in detail.

4. Execute the decompressed command to generate an executable script program named configure. It is used to check whether the system has the library required for compilation, and whether the library version meets the compilation requirements and other system information required for installation. Prepare for subsequent compilation. You can run the following command to view available configuration options for custom Compilation:

#./Configure -- help

In addition to some common configuration options, different software usually has some specific configuration options.

For example, if you want to install the software to a specified directory, use #. /configure-prefix = your own directory. For example, if you want to install an mlterm in the/opt/mlterm directory, enter the following

#./Configure-prefix =/opt/mlterm

5. After the check is passed, the MakeFile file for compilation will be generated. Now you can start compiling. The compilation process varies depending on the software scale and computer performance. Command:

# Make.

6. After compilation, enter the following command to start installation:

# Make install

So far, the software installation is complete.

For the second method, the installation method is much simpler.

Copy the installation file to your directory in the same way as the first method. Then use rpm to install the file. The command is as follows:

# Rpm-I filename. rpm

Rpm automatically unpacks the installation file and installs the software in the default directory. And register the software installation information to the rpm database. The role of parameter I is to enable rpm to enter the installation mode.

If the software package requires other software packages to work, you can first install other software packages, or install them at the same time:

# Rpm-I filename. rpm required. rpm

Uninstall Software
1. The software is mainly detached using rpm. To uninstall a software package, you must first know the name registered in the system. Type the following command:

# Rpm-qa

You can query all the software packages installed in the current system. The list is relatively long. You can use grep to filter software packages with specific names.

2. Determine the name of the software to be detached, and you can start to uninstall the software. Type the following command:

# Rpm-e [package name]

You can uninstall the software. The function of parameter e is to enable rpm to enter the uninstall mode. Uninstall the software package named [package name. Each software package in the system depends on each other. If the object cannot be detached because of dependency, the rpm prompts and stops uninstalling the object. You can run the following command to ignore the dependency and directly start detaching:

# Rpm-e [package name]-nodeps

Uninstalling dependencies may make other software unavailable in the system.

If you want to know where the rpm package is installed? Should be used

# Rpm-ql [package name]

3. How to uninstall the software installed with the source code package?

First, you can run the following command to uninstall it:

# Make uninstall

If the package has not been uninstalled, you can check "README" and "INSTALL" to see if there are any instructions.

If not, you can manually delete it based on the Installation action in the install process. In this way, you have successfully installed and uninstalled the Linux software.

  1. Teach you how to set Linux Startup Encryption
  2. Will you become a GNU/Linux User?
  3. Linux network operation commands
  4. Best Solution: Linux hard disk partitioning
  5. Brief Introduction to Linux Application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.