Linux常用的命令

查看端口是否启动: netstat -an |grep port

关闭防火墙systemctl status firewalld

service  iptables status

暂时关闭防火墙

systemctl stop firewalld

service  iptables stop

永久关闭防火墙

systemctl disable firewalld

chkconfig iptables off

重启防火墙

systemctl enable firewalld

service iptables restart

开放某个端口
开放8080端口:firewall-cmd --zone=public --add-port=8080/tcp --permanen
重启防火墙:firewall-cmd --reload

查看内存命令: free -m /-g 

查看进程: 

ps -a | grep helloworld 或

ps -ef |grep helloworld 或者其他

杀死进程:”kill -9 pid   

查看所有进程  : ps -aux

查看进程: ps -elf    -e:显示系统内的所有进程信息  -l:使用长(long)格式显示进程信息   -f:使用完整的(full)格式显示进程信息

查询***进程的详细信息 : ps -aux | grep ***   

查询***进程的详细信息: 

 查看内存中进程的动态信息: top   

安装sz: yum -y install lrzsz

原文地址:https://www.cnblogs.com/badboys/p/12631222.html