码迷,mamicode.com
首页 > 系统相关 > 详细

初识Linux,简单配置

时间:2019-05-28 12:30:36      阅读:148      评论:0      收藏:0      [点我收藏+]

标签:img   控制   inf   targe   image   alt   inux   相同   防火墙   

对于初学者来讲,操作系统安装完成之后最好先关闭防火墙和selinux,今天我就简单带大家配置一下

  • systemd的各种单元类型
    技术图片
    sysvinit运行级别
    技术图片
    技术图片
    技术图片
  • 常见的几种控制类型
    start(启动):运行指定的系统服务程序,实现服务功能
    stop(停止):终止指定的系统服务程序,关闭相应的功能
    restart(重启):先退出,再重新运行指定的系统服务程序
    reload(重载):不退出服务程序,只是刷新配置,再某些服务中与restart的操作相同
    status(查看状态):查看指定的系统服务的运行状态及相关信息
    技术图片
  • 查看系统的target
    技术图片
    因为我是图形切换的字符,所以是5 3 使用init 3切换即可
    [root@centos ~]#init 0 //关闭当前系统
    [root@centos ~]#init 6 //重启当前系统
    或者
    [root@centos ~]#systemctl poweroff //关闭当前系统
    [root@centos ~]#systemctl reboot //重启当前系统

  • 使用systemctl工具
    systemctl 控制选项 服务名称
  • 常见的选项如下:
    enable:开机自动启动
    disable:开机自动关闭
    is-enable:查看开机启动状态
    [root@centos ~]#systemctl enable 服务名称
    [root@centos ~]#systemctl disable 服务名称
    [root@centos ~]#systemctl is-enable 服务名称

初识Linux,简单配置

标签:img   控制   inf   targe   image   alt   inux   相同   防火墙   

原文地址:https://blog.51cto.com/14156658/2401270

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!