linux就该这么学 2021-01-08

man命令相当于linux手册

1.echo命令

echo命令用于在终端输出字符串或变量提取后的值,格式为“echo [字符串 | $变量]”

[root@linuxprobe ~]# echo linuxprobe test
linuxprobe test

[root@linuxprobe ~]# echo $BASH
/bin/bash

2.date命令

date命令用于显示及设置系统的时间或日期,格式为“date [选项] [+指定的格式]”

[root@linuxprobe ~]# date
Fri Jan  8 22:53:27 CST 2021

按照“年-月-日 小时:分钟:秒”的格式
[root@linuxprobe ~]# date "+%Y-%m-%d %H:%M:%S"
2021-01-08 22:53:28
[root@linuxprobe ~]# 

3.reboot命令

reboot命令用于重启系统,其格式为reboot

4.poweroff命令

poweroff命令用于关闭系统,其格式为poweroff。

linux就该这么学  2021-01-08

5.wget命令

wget命令用于在终端中下载网络文件,格式为“wget [参数] 下载地址”

[root@linuxprobe ~]# yum install -y wget
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Extra Packages for Enterprise Linux Modular 8 - x86_64         4.0 kB/s | 9.3 kB     00:02    
Extra Packages for Enterprise Linux 8 - x86_64                 2.9 kB/s | 8.5 kB     00:02    
localhost8                                                     2.7 MB/s | 2.7 kB     00:00    
localhost8_app                                                 3.1 MB/s | 3.2 kB     00:00    
Package wget-1.19.5-7.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@linuxprobe ~]# wget https://www.linuxprobe.com/docs/LinuxProbe.pdf
--2021-01-08 22:57:06--  https://www.linuxprobe.com/docs/LinuxProbe.pdf
Resolving www.linuxprobe.com (www.linuxprobe.com)... 60.217.246.204
Connecting to www.linuxprobe.com (www.linuxprobe.com)|60.217.246.204|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 17676281 (17M) [application/pdf]
Saving to: ?
上一篇:Linux下重启Oracle数据库


下一篇:Basic Level 1044 火星数字 (20分)