linux常用命令总结

来源:互联网 发布:python爬虫教程pdf 编辑:程序博客网 时间:2024/06/16 18:10

 service network restart   重启网络   

ls                                         显示该文件下的文件名   

ll                                          显示文件夹下的文件详情 

mkdir                                   新建文件夹

tar  zxvf + 压缩文件          解压文件

tar  zxvf + 压缩文件  -C + 目录 解压到指定目录

指令+ --help                     指令解释

source + 文件                   文件立即生效 

iptables -L -n                    防火墙规则

services iptables stop 关闭防火墙

yum install iptables-services 安装防火墙

systemctl enable iptables.service  创建防火墙可编辑文件

iptables  -I INPUT -P tcp --dport 8080 -j ACCEPT            添加8080端口允许访问

netstat -nlp | grep 8080                   查看8080端口使用状态

ps -ef |grep tomcat 查看tomcat使用情况




yum install iptables-services 安装防火墙

systemctl enable iptables.service  创建防火墙可编辑文件