解决方法

查看PATH变量是否包含wget命令的路径

wget命令的路径,有3种方法

[root@yunkai ~]# which wget
/usr/bin/wget
[root@yunkai ~]# type -a wget
wget is /usr/bin/wget
[root@yunkai ~]# command -v wget
/usr/bin/wget
[root@yunkai ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

检查路径 /usr/bin在PATH变量中。

安装wget命令

在CentOS Enterprise Linux 8上搜索wget包

sudo yum search wget

安装wget

sudo yum install wget

如何测试 wget命令

语法

wget url
wget https://exampleDotCom/fileName
wget http://url/path.tar.gz
wget [options] urls

wget下载文件更改保存文件的名字:

wget -O output.file https://www.baidu.com/index.html

wget如何限制下载速度

wget --limit-rate=50k https://pan.baidu.com/aaaa.zip

wget下载到一半中断了,如何接着下载?

wget -c url
wget --continue url

原因

wget命令未安装或者PATH变量没有包含wget命令的路径

在centos如何安装wget命令

wget是一个免费的开源软件包,用于使用HTTP、HTTPS和FTP Internet协议获取文件。

问题描述

在CentOS 8上使用wget命令报错:

bash: wget: command not found
日期:2019-04-29 03:18:04 来源:oir作者:oir