Home >Operation and Maintenance >CentOS >What should I do if the wget command cannot be used in CentOS?

What should I do if the wget command cannot be used in CentOS?

angryTom
angryTomOriginal
2020-03-17 17:22:0612934browse

What should I do if the wget command cannot be used in CentOS?

What should I do if the wget command cannot be used in CentOS

The wget command cannot be used in CentOS because it is not installed. You only need to install it.

1. Check whether it is installed:

(recommended learning: Linux video tutorial)

rpm -qa|grep "wget"

If it is installed The installation will display wget related information. If no information is displayed, it means it is not installed, and the wget command cannot be used.

2. Install wget

yum -y install wget

When you see Complete!, it means the installation is completed successfully!

3. Check again to see if it is installed (The following version information appears to indicate successful installation)

What should I do if the wget command cannot be used in CentOS?

4. Enter wget - h for testing

$ wget -h
GNU Wget 1.20.1,非交互式的网络文件下载工具。
用法: wget [选项]... [URL]...

长选项所必须的参数在使用短选项时也是必须的。
...

After correct installation, the wget command can be used.

PHP Chinese website, a large number of CentOS usage tutorials, welcome to learn!

The above is the detailed content of What should I do if the wget command cannot be used in CentOS?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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