Linux系统(2):系统的基础操作命令
clear:清屏
ifconfig:查看网络
hostname:查看主机名
service network restart:重启网络
hostnamectl set-hostname 主机名:永久修改主机名
systemctl status firewalld.service:查看防火墙状态
systemctl stop firewalld.service:关闭防火墙状态(关机或重启后自动打开)
systemctl disable firewalld.service:关闭防火墙开机自启(关闭防火墙后,关机或重启后不会自动打开)
①ifconfig:查看网络
![image]()
②systemctl status firewalld.service:查看防火墙状态
active (running)表示防火墙正在运行
![image]()
③systemctl stop firewalld.service:关闭防火墙状态(关机或重启后自动打开)
关闭防火墙,再查看防火墙状态
inactive(dead)表示防火墙已关闭,这只是一个临时关闭,关机或重启后防火墙会自动打开
![image]()
④systemctl disable firewalld.service:关闭防火墙开机自启(关闭防火墙后,关机或重启后不会自动打开)
⑤service network restart:重启网络
![image]()