关于系统一些命令

yum 常用命令:

命令 作用
yum repolist all 列出所有仓库
yum list all 列出仓库中所有软件包
yum info 软件包名称 查看软件包信息
yum install 软件包名称 安装软件包
yum reinstall 软件包名称 重新安装软件包
yum update 软件包名称 升级软件包
yum remove 软件包名称 移除软件包
yum clean all 清除所有仓库缓存
yum check-update 检查可更新的软件包
yum grouplist 查看系统中已经安装的软件包组
yum groupinstall 软件包组 安装指定的软件包组
yum groupremove 软件包组 移除指定的软件包组
yum groupinfo 软件包组 查询指定的软件包组信息
系统初始化进程

              systemd与System V init的区别以及作用

System V init运行级别 systemd目标名称 systemd 目标作用
0 poweroff.target 关机
1 rescue.target 单用户模式
2 multi-user.target 多用户的文本界面
3 multi-user.target 多用户的文本界面
4 multi-user.target 多用户的文本界面
5 graphical.target 多用户的图形界面
6 reboot.target 重启
emergency emergency.target 救援模式

      服务的启动、重启、停止、重载、查看状态等常用命令

老系统命令 新系统命令 作用
service foo start systemctl start httpd 启动服务
service foo restart systemctl restart httpd 重启服务
service foo stop systemctl stop httpd 停止服务
service foo reload systemctl reload httpd 重新加载配置文件(不终止服务)
service foo status systemctl status httpd 查看服务状态

  服务开机启动、不启动、查看各级别下服务启动状态等常用命令

老系统命令 新系统命令 作用
chkconfig foo on systemctl enable httpd 开机自动启动
chkconfig foo off systemctl disable httpd 开机不自动启动
chkconfig foo systemctl is-enabled httpd 查看特定服务是否为开机自启动
chkconfig --list systemctl list-unit-files --type=httpd 查看各个级别下服务的启动与禁用情况

 

posted @ 2021-04-28 21:32  MrTang88  阅读(68)  评论(0)    收藏  举报