进程相关

搜索某一个进程(以进程Server为例)

ps -ef | grep 进程名 # 根据进程名查看进程信息

netstat -tunlp | grep 端口号 # 根据端口查看对应进程,查看占用8080端口的进程id

举例

ps -ef | grep Server

netstat -tunlp | grep 8080

关闭进程

kill -9 端口号

举例:例如要关闭端口号为8088的进程

kill -9 8088

防火墙相关

放行端口

firewall-cmd --zone=public --add-port=4568/tcp --permanent   # 开放4568端口

firewall-cmd --zone=public --remove-port=4567/tcp --permanent #关闭4567端口

firewall-cmd --reload # 配置立即生效

基本命令

查看当前命令

pwd