Linux教程

Linux系统管理

本文主要是介绍Linux系统管理,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236639785506.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) #### 1.Linux下的系统进程 ##### 1.1 init进程的职责 ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236649931355.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236658928970.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) Systemd命令比较常用 ##### 2.Systemd ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236701198618.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) systemctl status 服务名 查看服务的当前状态 ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236725761146.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236739103406.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236754495161.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 1.查看sshd.service里的内容 ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236769893851.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 2.写一个alibaba.service [Unit] Description=Write Something Wants=network-online.target After=network.target [Service] Type=oneshot RemainAfterExit=yes ExecStart=touch /tmp/testfile ExecStop=rm -f /tmp/testfile [Install] WantedBy=multi-user.target ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236784905408.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 3.crontab定时任务 ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236802776066.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 1.查看当前日程表 ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236813785350.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 2.编辑一个日程表 ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236826538388.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236835994908.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) 4.Supervisor ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236852734904.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=) ![image.png](http://www.www.zyiz.net/i/li/?n=2&i=images/20210702/1625236865573994.png?,size_14,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_20,type_ZmFuZ3poZW5naGVpdGk=)
这篇关于Linux系统管理的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!