If you want to install a software application but do not know the name of the software package, you can use the tools in the Linux system to search for the package. This topic describes the commands that you can use to search for software packages and how to use these commands on different Linux distributions.

Search for software packages on CentOS

  • Command
     yum search [keywords of software packages]
  • Examples
    • Example 1: Search for two software applications with the keywords "rz" and "sz".
      Run the following command to search for the software packages to which the two applications belong.
      yum search sz rz
      The command result indicates that these two software applications belong to the lrzsz.x86_64 package, as shown in the following figure. After you install the package, you can use the lrz and lsz software applications.
      sz_rz
    • Example 2: Search for a software application by using the keyword "mysql-community-server".
      Run the following command to search for the software package to which the application belongs.
       yum search mysql-community-server
      The command result indicates the package to which the software application belongs, as shown in the following figure.
      mysql
      Note If you cannot find the mysql-community-server package in the CentOS operating system, it may be because you have not added the repository of the software package. For more information about how to add the required software repository, and install and use MySQL Server, see Use MySQL on ECS.

Search for software packages on Debian or Ubuntu

  • Command
      apt-cache search [keywords of software packages]
  • Examples
    • Example 1: Search for software packages relating to Web servers.
      Run the following command to search for the software packages.
      apt-cache search "web server"
      The command result indicates that apache2 is the software package of the Web server, as shown in the following figure.
      web-server
    • Example 2: Search for Java development environment by using the keyword "openjdk".
      Run the following command to search for "openjdk".
      apt-cache search openjdk
      The command result shows the software packages relating to openjdk, as shown in the following figure.
      openjdk

Next steps

After you find the software packages, you may need to install them. For more information about how to install software packages, see Install software packages.