一、磁盘管理命令 1。df 查看文件系统信息。 使用模式:dfhdfBunitkmgtP。。。 2。du 查看文件的大小。 使用模式:dfsBunitkmgtP。。。二、网络管理命令 1。ping 测试两台主机之间的网络连通性。 使用模式:pingIPIP地址ping192。168。28。1pingdomain域名pingwww。baidu。comctrlc中断命令 2。ifconfig 查看网络设备信息。 使用模式:ifconfig所有设备ifconfigequipname特定设备 3。netstat 查看网络程序打开的端口信息。 使用模式:netstatanp查看所有端口netstatanpgrepkeyword根据关键字查找端口〔rootlocalhost〕netstatanpActiveInternetconnections(serversandestablished)ProtoRecvQSendQLocalAddressForeignAddressStatePIDProgramnametcp00127。0。0。1:22080。0。0。0:LISTEN3732hpiodtcp000。0。0。0:7500。0。0。0:LISTEN3536rpc。statdtcp000。0。0。0:1110。0。0。0:LISTEN3504portmaptcp00127。0。0。1:6310。0。0。0:LISTEN3759cupsdtcp00127。0。0。1:250。0。0。0:LISTEN3868sendmail:accetcp00127。0。0。1:22070。0。0。0:LISTEN3737pythontcp00:::22:::LISTEN3750sshdtcp0148::ffff:192。168。28。130:22::ffff:192。168。28。1:57520ESTABLISHED53271关键字LocalAddress:本机IP,网络程序端口ForeignAddress:远程主机IP,网络程序端口PID:本机网络程序进程标识符Programname:本机网络程序名三、备份压缩命令 压缩格式:windows:。rar。zip。7Z linux:。zip。gz。bz2 1。zip 使用模式:ziprxxx。zipfiles 2。unzip 使用模式:unzipxxx。zip上传下载:rz上传文件szfilename下载文件 3。tar 打包或压缩文件。 打包:将多个文件合并成一个文件。。tar 压缩:减少文件容量。gzip。tar。bzip2。tar。bz2 使用模式:tarcvfxxx。tarfiles打包文件tartvfxxx。tar查看包中有哪些文件tarxvfxxx。tar解包tarxvfxxx。tarCdstdir指定解包路径tarczvfxxx。tar。gzfiles用gzip压缩tarcjvfxxx。tar。bz2files用bzip2压缩tarxzvfxxx。tar。gz用gzip解压tarxjvfxxx。tar。bz2用bzip2解压ccreatevviewffilex解压,解包zgzipjbzip2四、程序安装命令 安装方式: 源码安装(项目2) rpm安装windows:。exe redhat:。rpm(redhatpackagemanage) 安装步骤: s1。查看包是否安装rpmqagrepkeyword s2。卸载包rpmekeywordearse s3。安装包rpmivh。rpm。rpm包名