centos7 基本操做

跳转目录html

cd pathios

跳到上一级目录centos

cd ..网络

列出当前目录tcp

ls centos7

转到管理员root账号.net

surest

编辑文件htm

vi pathblog

按i 插入字符

退出时按Esc 退出  再出入命令 :wq  再按Enter,也能够ZZ退出

http://www.javashuo.com/article/p-wkdpxsco-cw.html

rm -f file 强制删除文件

重命名文件

mv oldname newname

查看ip

ip addr

centos7 默认不启动网卡,没法上网,须要修改配置文件

https://blog.csdn.net/haopeng7816/article/details/83929045

防火墙 firewalld

启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld 
开机禁用  : systemctl disable firewalld
开机启用  : systemctl enable firewalld

开放80端口:  firewall-cmd --zone=public --add-port=80/tcp --permanent

 

重启防火墙以使配置即时生效:systemctl restart firewalld

 
修改静态ip 
改完ip 重启网络会失败,须要禁用networkmanager:
service NetworkManager stop
相关文章
相关标签/搜索