ITeye博客

Linux常用命令管理

Flemming323 · 2014-10-09 10:19 · Linux · 编程语言 · Markdown

netstat -lntp 查看端口

 

ls 列出目标目录中所有的子目录和文件

 

ifconfig 查看本机IP

 

rpm -e --nodeps + 包名 卸载软件

 

1.查找被占用的端口
          netstat -tln  
          netstat -tln | grep 8083 

 netstat -tln 查看端口使用情况,而netstat -tln | grep 8083 则是只查看端口8083的使用情况

 

2.查看端口属于哪个程序?端口被哪个进程占用
         lsof -i :8083 

 

3.杀掉占用端口的进程
          kill -9 进程id 

 

Linux关闭防火墙命令

1) 永久性生效,重启后不会复原
开启:chkconfig iptables on
关闭:chkconfig iptables off

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。