赞
踩
wget命令用于使用命令下载网络文件,格式为:
wget [参数] 下载地址
参数介绍
-b:后台下载模式;
-O:下载到指定目录/<文件名(自己命名)>;
-t:最大尝试次数;
-c:断点续传;
-p:下载页面所有资源,包括图片、视频等;
-r:递归下载。
示例
[root@localhost 桌面]# wget -O /home/Howie/Linux/test.zip -t 1 -p -c -r http://www.linuxprobe.com
ifconfig 用于获取网卡配置与网络状态等信息;格式为“ifconfig [网络设备] [参数]”
如:查看本机当前网卡配置与网络状态信息
[root@localhost 桌面]# ifconfig eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.72.145 netmask 255.255.255.0 broadcast 192.168.72.255 inet6 fe80::20c:29ff:fec4:4666 prefixlen 64 scopeid 0x20<link> ether 00:0c:29:c4:46:66 txqueuelen 1000 (Ethernet) RX packets 267274 bytes 371652963 (354.4 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 76226 bytes 6233981 (5.9 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (Local Loopback) RX packets 4 bytes 340 (340.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 4 bytes 340 (340.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255 ether 52:54:00:56:cb:c6 txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
uname命令用于查看系统内核版本等信息,格式为“uname [-a]”;
查看系统内核名称、内核发行版,内核版本、节点名、硬件名称、硬件平台、处理器类型、操作系统等信息。如下:
[root@localhost 桌面]# uname -a
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
uptime用于查看当前系统的负载情况,如下:分别输出,当前系统时间,已运行时间、当前在线用户以及平均负载值。负载值分为最近1分钟、5分钟、15分钟的系统负载情况,负载值越低越好(小于1是正常的),可能我的是虚拟机的原因,有点不正常了。
[root@localhost 桌面]# uptime
23:48:55 up 2:13, 4 users, load average: 1.10, 1.03, 0.84
free命令用于显示当前系统中内存的使用情况,格式为“free [-m/-g]”,如下:
[root@localhost 桌面]# free -m
总计内存量 已使用 可用量 进程共享的内存量 磁盘魂村的内存量 缓存的内存量
total used free shared buff/cache available
Mem: 3776 844 1361 12 1570 2580
Swap: 3967 0 3967
who命令用于查看当前登录主机的用户情况,格式为“who[参数]”
[root@localhost 桌面]# who
登录用户名 终端设备 登录时间
root :0 2021-07-23 21:35 (:0)
root pts/0 2021-07-23 21:35 (:0)
root pts/1 2021-07-23 23:18 (:0)
root pts/2 2021-07-23 23:24 (:0)
last用于查看登录系统的用户记录,格式为“last[参数]”;如:
[root@localhost 桌面]# last root pts/2 :0 Fri Jul 23 23:24 still logged in root pts/1 :0 Fri Jul 23 23:18 still logged in root pts/0 :0 Fri Jul 23 21:35 still logged in root :0 :0 Fri Jul 23 21:35 still logged in (unknown :0 :0 Fri Jul 23 21:35 - 21:35 (00:00) reboot system boot 3.10.0-327.el7.x Fri Jul 23 21:35 - 00:03 (02:27) root pts/0 :0 Thu Jul 22 23:28 - 12:09 (-222+-11:-1 root :0 :0 Thu Jul 22 23:20 - 12:09 (-222+-11:-1 (unknown :0 :0 Thu Jul 22 23:13 - 23:20 (00:06) reboot system boot 3.10.0-327.el7.x Thu Jul 22 23:13 - 00:03 (1+00:49) root pts/1 :0 Thu Jul 22 22:59 - 23:13 (00:14) root pts/1 :0 Thu Jul 22 22:57 - 22:58 (00:00) root pts/0 :0 Thu Jul 22 22:54 - 23:13 (00:18) root :0 :0 Thu Jul 22 22:53 - 23:13 (00:20) (unknown :0 :0 Thu Jul 22 22:52 - 22:53 (00:00) reboot system boot 3.10.0-327.el7.x Thu Jul 22 22:52 - 00:03 (1+01:10) reboot system boot 3.10.0-327.el7.x Thu Jul 22 22:51 - 22:52 (00:01) reboot system boot 3.10.0-327.el7.x Thu Jul 22 22:50 - 22:50 (00:00) reboot system boot 3.10.0-327.el7.x Thu Jul 22 22:48 - 22:50 (00:01)
history命令用于显示历史执行过的命令,格式为“history [-c]”;如下:注:-c:代表清除历史命令
[root@localhost 桌面]# history -c
[root@localhost 桌面]# history
1 history
历史命令会被保存到用户家目录的“.bash_history”中;
[root@localhost 桌面]# cd ~
[root@localhost ~]# ls -a
. .bash_history .bashrc .cshrc .ICEauthority .tcshrc 视频 下载
.. .bash_logout .cache .dbus initial-setup-ks.cfg 公共 图片 音乐
anaconda-ks.cfg .bash_profile .config .esd_auth .local 模板 文档 桌面
查看该文件保存的信息
cat ~/.bash_history;如下:
[root@localhost ~]# cat ~/.bash_history mkdir -p /media/cdrom mount /dev/cdrom/media/cdrom mount /dev/cdrom /media/cdrom dir ls ls -a cd .. ls -a cd ./桌面 ls ls -a ls -l cd .. ls cp VMwareTools-10.3.10-13959562.tar.gz /home
sosreport命令用于手机系统配置并诊断信息后输出结论文档,格式为:“sosreport”。如下:
[root@localhost ~]# sosreport sosreport (version 3.2) This command will collect diagnostic and configuration information from this Red Hat Enterprise Linux system and installed applications. An archive containing the collected information will be generated in /var/tmp and may be provided to a Red Hat support representative. Any information provided to Red Hat will be treated in accordance with the published support policies at: https://access.redhat.com/support/ The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No changes will be made to system configuration. #选择继续还是退出,继续下面的步骤并生成故障信息,退出返回命令行终端。 Press ENTER to continue, or CTRL-C to quit. Please enter your first initial and last name [localhost.localdomain]: 直接回车 Please enter the case id that you are generating this report for []: 直接回车 正在生成 Setting up archive ... Setting up plugins ... Running plugins. Please wait ... Running 92/92: yum... Creating compressed archive... Your sosreport has been generated and saved in:生成的文件和保存位置 /var/tmp/sosreport-localhost.localdomain-20210724001634.tar.xz The checksum is: 2f0afa04bd9c2794e7d7d106e0d495fc Please send this file to your support representative.//可以发送这个文件给厂家
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。