培训学习笔记 4 day

第四天:
***************************************************************

周六日练习安装 cent os 7    windows server 2008

在Linux中,一般情况下修改系统或者服务的配置信息,有两种修改方法:临时修改(命令行修改),永久修改(修改配置文件)

centos系统的网卡配置文件位置 /etc/sysconfig/network-script/ifcfg-eth0
ubuntu系统的网卡配置文件位置 /etc/network/interfaces

重启网卡:/etc/init.d/networking restart

配置临时IP:sudo ifconfig ens3 192.168.100.100 255.255.255.0

更改Ubuntu的更新源  
    step 1:找到配置文件  /etc/pat/sources.list,备份该文件:cp sources.list sources.list.bak
    step 2:编辑sources.list,vim sources.list,将源(镜像站)替换以前的内容,保存即可
    step 3:    apt-get update     更新源
            apt-get upgrade 更新软件

---------------------------------------------------------------
.tar
tar 默认情况下是用来打包或者压缩文件
tar -cvf test.tar shell.php index.html        打包文件
tar -xvf test.tar                             解包

.zip
zip in.zip index.html index1.html            压缩文件
unzip test.zip                                解压缩
unzip -l test.zip                            查看压缩内容

.tar.gz
tar -zcvf test.tar.gz file1 file2          打包并以gzip格式进行压缩
tar -tvf test.tar
tar -zxvf test.tar.gz                    解压缩
----------------------------------------------------------------

nsloopup                查看dns信息
ps                        查看运行的程序
ps -aux                 
top                        实时查看运行的程序
service networking restart
curl                    获取网页
wget url                下载                        

扫描二维码关注公众号,回复: 4806836 查看本文章

猜你喜欢

转载自blog.csdn.net/qq_34449006/article/details/84746330