linux的网络、进程、服务管理
linux中的网络管理
在linux的配置文件:
vim /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=“static”
ONBOOT=“yes”
IPADDR = xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
DNS1=xxx.xxx.xxx.xxx
linux的进程管理
查看进程:ps
ps:只会显示应用进程
ps -e:显示所有进程
ps -ef:以全格式的形式显示所有进程
通常用于查看linux中的某些软件或者应用是否处于启动状态
ps -ef|grep firewalld:如果要查询防火墙进程,可以使用过滤
关闭进程:
使用ps命令查看进程的PID,使用命令kill -9 PID
linux的服务管理
服务是支撑linux运行的一些必要程序,本质上也是进程,叫做守护进程。守护进程通常默默地运行在后台,为应用程序提供必要的支撑,比如sshd、防火墙等。
操作服务:systemctl [参数] 服务名称
参数:start、stop、restart、reload、status、enable
systemctl status firewalld:查看防火墙状态
systemctl stop firewalld:关闭防火墙
systemctl start firewalld:开启防火墙
systemctl enable firewalld:设置防火墙开机启动