
Linux
文章平均质量分 64
Linux下遇到的问题以及操作记录
chang2p
这个作者很懒,什么都没留下…
展开
-
Linux查看哪些ip被占用
// #!/bin/bashIP=192.168.100for i in `seq 0 255` #for循环,bai查找192.168.100.0-255的所有地址#for i in 192.168.100.{1,254}doping -c 2 $IP.$i > /dev/null 2>&1 #ping 只发两个包,要不然不会自动结束zhi,另外将屏幕输出信息重定向if [ `echo $?` -eq 0 ];then #使用 echo$?判断命令执行结果的返回值echo原创 2020-07-23 15:13:45 · 1867 阅读 · 0 评论 -
centos下的防火墙操作
CentOS 7.0默认使用的是firewall作为防火墙,之前版本是使用iptables。所以在CentOS 7执行下面命令是无法查看防火墙状态的。[root@localhost ~]# service iptables statusRedirecting to /bin/systemctl status iptables.serviceUnit iptables.service could not be found.查看防火墙是否关闭firewall-cmd –state[root@lo原创 2020-07-23 15:52:22 · 141 阅读 · 0 评论