系统管理
shutdown
halt
poweroff
reboot
hostnamectl
修改主机名
hostnamectl
hostnamectl set-hostname xxxx
hostname
查看或临时修改主机名(重启Linux后失效)
ubt中网卡配置生效
修改网卡配置文件
netplan apply
networkctl reload
systemctl
管理服务(开启,关闭,重启服务),设置开机自动启
systemctl restart network<br>
start
stop
restart
systemctl disable firewalld
关闭开机自启动
enable
disable
systemctl stop firewalld
关闭正在运行防火墙
systemctl status firewalld
free
查询内存信息
-h 人类可读形式查看大小
uname
查看系统的信息,内核,主机名,cpu架构
-r
关闭selinux
vim /etc/selinux/config 里面SELINUX=行改为SELINUX=disabled<br>getenforce
getenforce<br>
disabled 重启后才会提示
permissive 关闭
enforcing 开启的
top
默认是交互式的显示系统系统命令
交互式:top
非交互式: top -bn1
kill
kill + pid
kill -9 pid
&
nohup 命令 &