How to install the application on Linux

Source: Internet
Author: User

How to install the application on Linux

Compiled from: Https://opensource.com/article/18/1/how-install-apps-linux Seth Kenlon
Original: LCTT https://linux.cn/article-9486-1.html Translator: Mjseven
This address: https://linux.cn/article-9486-1.html

2018-03-27 12:59

This article navigation
    • -Warehouse 03%
      • -Additional warehouse 20%
    • -Do not use the warehouse to install the application 31%
      • -linux bag 33%
      • -Generic installation script 41%
      • -appimage Portable Application 51%
      • -Application directory 59%
    • -Compiling 87% from source code
    • -Now you understand, 90% .

Learn to fiddle with those software on your Linux computer.

How do I install an application on Linux? Because there are many operating systems, there is more than one answer to this question. Applications can come from many sources – almost impossible to clear, and each development team can provide the software in the way that they think is best. Knowing how to install the software you get is part of becoming an advanced user of the operating system.

Warehouse

For more than more than 10 years, Linux has been using software libraries to distribute software. In this case, the "warehouse" is a public server that hosts the installable packages. The Linux distribution provides a command, along with a graphical interface for the command, to get the software from the server and install it on your computer. This is a very simple concept, it has become the model of all major mobile phone operating systems, and recently, the model has become the two major closed-source computer operating system "application store."

Not the App Store

Installing from a software warehouse is the primary way to install applications on Linux, and it should be the preferred place for any application you want to install.

Installing from a software warehouse typically requires a command such as:

    1. $ sudo dnf install inkscape

The actual command used depends on the Linux distribution you are using. Fedora use, dnf OpenSUSE use, zypper Debian and Ubuntu use, apt Slackware use, sbopkg FreeBSD use, pkg_add and Lllumos based Openlndiana make Use pkg . Regardless of what you use, the command usually searches for the correct name of the application you want to install, because sometimes you think the software name is not its official or unique name:

  1. $ sudo dnf search pyqt
  2. PyQt.x86_64 : Python bindings for Qt3
  3. PyQt4.x86_64 : Python bindings for Qt4
  4. python-qt5.x86_64 : PyQt5 is Python bindings for Qt5

Once you have found the name of the package to be installed, use the install subcommands to perform the actual download and automatic installation:

    1. $ sudo dnf install python-qt5

For specific information about installing from a software warehouse, refer to your Linux distribution documentation.

This is often the case with graphical tools. Search for what you think you want, and then install it.

As with the underlying command, the name of the graphical installer depends on the Linux distribution you are running. Related applications are typically tagged with keywords such as "software (software)" or "package", so search for these words in your startup items or menus, and you'll find what you want. Since open source is all chosen by the user, if you do not like the graphical user interface (GUI) provided by your distribution, then you can choose to install alternatives. You know how to do that.

Additional warehouses

Your Linux distribution provides a standard repository for packaged software, often with additional warehouses. For example, EPEL services for Red Hat Enterprise Linux and centos,rpmfusion services in Fedora,ubuntu have various levels of support as well as a personal package archive (PPA), Packman provides additional software for OpenSUSE to and Slackbuilds.org provides community building scripts for Slackware.

By default, your Linux operating system is set to view only its official warehouses, so if you want to use other software collections, you must add additional libraries yourself. You can usually install the repository as if you were installing a package. In fact, when you install many software such as GNU Ring video chat, Vivaldi Web browser, Google Chrome, and so on, your actual installation is to access their private repositories, from which the latest version of the application is installed on your machine.

Install the Warehouse

You can also manually add warehouses to your package Manager's configuration directory by editing a text file, or run a command to add a warehouse. As usual, the exact command you use depends on the Linux distribution. For example, this is a dnf command that adds a warehouse to the system:

    1. $ sudo dnf config-manager --add-repo=http://example.com/pub/centos/7
Install applications without using a warehouse

The warehouse model is very popular because it provides a link between the user (you) and the developer. After an important update is released, you are prompted to accept the update, and you can accept all updates from a centralized location.

However, sometimes a package has not been put into the warehouse. These installation packages are available in several forms.

Linux Packages

Sometimes developers distribute software in a generic Linux packaging format, such as RPM, DEB, or newer but very popular FlatPak or SNAP formats. You are not visiting the warehouse to download, you just got this package.

For example, the video editor Lightworks provides a file for APT users .deb , and the RPM user provides the .rpm file. When you want to update, you can download the latest suitable files to the website.

These disposable packages can be installed using the same tools that are used to install from the warehouse. If you double-click the downloaded package, the graphical installer starts and steps through the installation process.

Alternatively, you can install from the terminal. The difference here is that the standalone package files you download from the Internet are not from the warehouse. This is a "local" installation, which means that your software installation package does not need to be downloaded to install. Most package managers are handled transparently:

    1. $ sudo dnf install ~/Downloads/lwks-14.0.0-amd64.rpm

In some cases, you need to take additional steps to make the application run, so read through the documentation about the software you are installing.

Generic installation scripts

Some developers publish their packages in several common formats. Common extensions include the .run and .sh . NVIDIA graphics drivers, Foundry visual FX packages like Nuke and Mari, and many non-DRM games from GOG are used with this installer. (LCTT: DRM is Digital rights management.) )

This installation mode relies on the developer to provide the installation wizard. Some of the installers are graphical, while others are just running in the terminal.

There are two ways to run these types of Setup programs.

1. You can run the installer directly from the terminal:

    1. $ sh ./game/gog_warsow_x.y.z.sh

2. Alternatively, you can run it by marking it as an executable file. To mark the installer executable file, right-click its icon and select its properties.

To execute permissions on the Setup program.

Once you allow it to run, double-click the icon to install it.

GOG installation program

For the rest of the installer, just follow the onscreen instructions.

Appimage Portable Applications

The appimage format is relatively new for Linux, although its concept is based on NeXT and Rox. The idea is simple: everything you need to run your application should be in a directory, and that directory is considered an "application." To run the application, simply double-click the icon to run it. You don't need or should install the application in a traditional sense; it runs from anywhere on your hard drive.

Although it can be run as a standalone application, Appimage often provides some system integration.

Appimage System Integration

If you accept this condition, install a local .desktop file to your home directory. .desktopfiles are the Linux Desktop application menu and a small configuration file used by the mimetype system. Essentially, you simply place the desktop configuration file in the application list in the home directory to "install" the application without actually installing it. You get all the benefits of installing something, and the benefit of being able to run something locally, a "portable application."

Application directory

Sometimes a developer simply compiles an application and then publishes the results to a download with no installation script or packaging. Typically, this means that you download a TAR file, unzip it, and then double-click the executable file (usually the name of the software you downloaded).

Download Twine

When you use this software to deliver, you can put it in the place where you downloaded it, and when you need it, you can start it manually, or you can do it yourself for a quick but troublesome installation. This includes two simple steps:

    1. Save the directory to a standard location and start it manually if needed.
    2. Save the catalog to a standard location and create a .desktop file to integrate it into your system.

If you are simply installing the application for yourself, you will traditionally place a bin directory ("binary binary" abbreviation) in your home directory as the storage location for locally installed applications and scripts. If you have other users on your system who need access to these applications, traditionally place binary files in /opt . Finally, it depends on where you store the application.

Downloads are usually performed in a directory with a version name, such as twine_2.13 or pcgen-v6.07.04 . Since it is assumed that you will update the application at some point, it is a good idea to delete the version number or create a symbolic link to the directory. This way, even if you update the application itself, the startup program created for the application can remain intact.

To create a .desktop startup file, open a text editor and create a twine.desktop file named. The desktop entry specification is defined by freedesktop.org. Here is a simple launcher for a game development IDE named Twine, installed in a system-wide /opt directory:

  1. [Desktop Entry]
  2. Encoding=UTF-8
  3. Name=Twine
  4. GenericName=Twine
  5. Comment=Twine
  6. Exec=/opt/twine/Twine
  7. Icon=/usr/share/icons/oxygen/64x64/categories/applications-games.png
  8. Terminal=false
  9. Type=Application
  10. Categories=Development;IDE;

The tricky line is the Exec line. It must contain a valid command to start the application. Usually, it's just the full path of what you download, but in some cases it's more complicated. For example, a Java application might need to be started as a parameter to Java itself.

    1. Exec=java -jar /path/to/foo.jar

Sometimes, a project contains a wrapper script that you can run, so you don't have to find the correct command:

    1. Exec=/opt/foo/foo-launcher.sh

In this twine example, there is no icon bundled with the downloaded software, so the sample .desktop file specifies the generic game icon that comes with the KDE desktop. You can use a similar workaround, but if you are more artistic, you can create your own icons, or you can search for a good icon on the Internet. As long as the Icon line points to a valid PNG or SVG file, your application will be represented by that icon.

The sample script also sets the application category primarily to development, so twine appears under the development category in KDE, GNOME, and most other application menus.

In order for this example to appear in the Application menu, put the twine.desktop file in one of the two places:

    • If you store your application in your own home directory, then please place it in the ~/.local/share/applications .
    • If you store the application in a /opt directory or other system-wide location and want it to appear in the Application menu for all users, place it in the /usr/share/applications directory.

The application is now installed because it needs to be integrated with other parts of the system.

Compiling from source code

Finally, there is a real universal format for installing the format: source code. Compiling applications from source code is a good way to learn how to build applications, how to interact with systems, and how to customize applications. Nonetheless, it is definitely not a click-button process. It requires a build environment that typically requires the installation of dependent libraries and header files, and sometimes some debugging.

To learn more about compiling from source code, please read my article.

Now you understand.

Some people think that installing software is a magical process that only developers understand, or that they think it "activates" the application, as if the binary executable was invalid before "install." Learning many different installation methods will tell you that the installation is really just a shorthand for "copying files from one place to the appropriate place in the system". There's nothing mysterious about it. As long as you understand how each installation is not expected to happen, and find out what the developer set up for the installation process, it's usually easy, even if it's different from your habits.

It is important that the installer be honest with you. If you encounter an installation program that attempts to install other software without your consent (or it may request consent in a confusing or misleading manner), or if you attempt to perform a check on the system for no apparent reason, do not proceed with the installation.

Good software is flexible, honest, and open. Now you know how to get good software on your computer.

Via:https://opensource.com/article/18/1/how-install-apps-linux

Seth Kenlon Translator: Mjseven proofreading: Wxy

This article was compiled by LCTT original, Linux China honors launched

How to install the application on Linux

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.