service network restart 为什么要倒装呢,因为service是linux系统的一个命令。
    执行系统服务的进程叫做守护进程,可以认为服务和守护进程一样,不用仔细区分
    服务的结尾一般是d,daemon
    cnetos 6 (了解)
    service 服务名 start | restart | status
    经验技巧

    1. cd /etc/init.d
    2. ls -al

    image.png
    centos7 对6 做了兼容,但是service命令支持的服务很少了。

    centos 7
    1)基本语法
    systemctl start| stop|restart| status 服务名
    2) 经验技巧

    ls /usr/lib/systemd/
    

    image.png
    除了systemd以外

    ls /usr/lib/systemd/system
    

    image.png
    .service结尾的全都是服务文件,.target结尾的是一组服务的集合,可以认为还是服务。要控制管理的还是这些服务的集合。
    /etc/init.d下的少数服务,依然可以使用ssytemctl去调用

    centos7的默认网络服务其实是networkmanger,推荐方案其实是关闭network,而去使用networkmanger,否则容易出错
    image.png