首页 > 系统服务 > 详细

Ubuntu linux 下的基本操作

时间:2015-05-04 21:54:50      阅读:270      评论:0      收藏:0      [点我收藏+]

 

防火墙相关:

关闭防火墙:

ufw disable

技术分享

开启防火墙:

ufw enable

技术分享

更详细的ufw功能用法见:ufw -h

其他linux平台下的一些(但是ubuntu下不好用):

查看防火墙状态:                /etc/init.d/iptables status
暂时关闭防火墙:                /etc/init.d/iptables stop
禁止防火墙在系统启动时启动       /sbin/chkconfig --level 2345 iptables off
重启iptables                  /etc/init.d/iptables restart

 

1 重启后永久性生效:
开启:chkconfig iptables on
关闭:chkconfig iptables off

2  即时生效,重启后失效:
开启:service iptables start
关闭:service iptables stop

或者:
/etc/init.d/iptables status         会得到一系列信息,说明防火墙开着。
/etc/rc.d/init.d/iptables stop     关闭防火墙

 

 

查看网络端口状态

看看哪些端口正处于listen状态

netstat -npl

技术分享

eg:检查某一端口的监听信息

netstat -anp | grep 端口号

lsof -i | grep 端口号

 

Ubuntu linux 下的基本操作

原文:http://www.cnblogs.com/sunniflyer/p/4477140.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!