Linux基础学习-进程-服务-防火墙

1.进程查看的命令ps

      -e 显示所有进程

      -f   全格式显示

      -a   显示所有进程

      -u   指定用户的所有进程

      -x  显示所有程序,不以终端区分

PPID  父进程ID

 

2.linux启

开机——bios——/boot——systemd进程——运行级别——运行级别对应的服务

 

3.chkconfig   查看开机启动的进程,设置后需要重启设备才能生效

[root@mysql init.d]# chkconfig --list

 

4.查看服务是不是自启动的状态

[root@mysql system]# systemctl is-enabled firewalld
disabled

5.开启防火墙端口

[root@mysql ~]# firewalld-cm --permanent --zone=public  --add-port=11/tcp

--permanent  永久生效,不加这个参数,重启后失效

--zone=public 作用域

也可以直接添加服务

 

[root@mysql ~]# firewall-cmd --permanent --zone=public --add-service=mysql
success

关闭或者开启完成后要重新载入防火墙

[root@mysql ~]# firewall-cmd --reload
success

查看端口是否开启

[root@mysql ~]# firewall-cmd --query-port=111/tcp

移除防火墙端口:

[root@mysql ~]# firewall-cmd --remove-port=111/tcp --permanent
success

查看已经打开的端口 

[root@mysql shell]# firewall-cmd --zone=public --list-ports

6.监控网路进程

 

netstat   -an

netstat   -ntlp

netstat   -nap

 

 

posted @ 2021-12-04 21:00  中仕  阅读(6)  评论(0)    收藏  举报