#### wget
- 下载大文件时的断点续连,防止网络异常中断:
```bash
alias wget='wget -c '
```
#### **getpass**
- 生成 20 个字符的随机数密码,使用 openssl 命令,但命令又很长不方便,可以设置别名:
```bash
alias getpass="openssl rand -base64 20"
```
#### ping
- ping url时会无限次输出,但其实没多大意义,可以使用 -c 命令将其限制为 5 次输出:
```bash
alias ping='ping -c 5'
```
#### speed
- 测试网速命令speedtest-cli ,为了方便使用可以设置别名:
- 安装: speedtest-cli是基于python编写的需要使用pip工具下载
```bash
[root@server ~]# pip install speedtest-cli
bash: pip: command not found...
Install package 'python3-pip' to provide command 'pip'? [N/y] y
* Waiting in queue...
* Loading list of packages....
The following packages have to be installed:
python3-pip-21.2.3-6.el9.noarch A tool for installing and managing Python3 packages
Proceed with changes? [N/y] y
```
- 查看手册
```bash
[root@server ~]# speedtest-cli --help
# 常用参数
--list:根据距离显示speedtest.net的测试服务器列表
--server:指定列表中id的服务器来做测试
--share:分享你的网速,该命令会在speedtest网站上生成网速测试结果的图片
--simple:只显示ping和上下行速度
```