欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

ubuntu開機自啟動服務(wù)設(shè)置

 更新時間:2021年12月30日 08:46:46   作者:Wogg  
大家好,本篇文章主要講的是ubuntu開機自啟動服務(wù)設(shè)置,感興趣的同學趕快來看一看吧,對你有幫助的話記得收藏一下,方便下次瀏覽

在ubuntu 下創(chuàng)建服務(wù)及自啟動的方法:

1. 在 [/lib/systemd/system] 創(chuàng)建sandtable.service 服務(wù),

[Unit]
Description=/etc/sandtable Compatibility
Documentation=man:systemd-sandtable-generator(8)
ConditionFileIsExecutable=/etc/sandtable
After=network.target
 
[Service]
Type=forking
ExecStart=/etc/sandtable start
TimeoutSec=0
RemainAfterExit=yes
GuessMainPID=no
 
[Install]
WantedBy=multi-user.target  
Alias=sandtable.service

2. 創(chuàng)建啟動腳本

在[/etc]文件夾下創(chuàng)建sandtable啟動腳本,切記加上[腳本后&], 保證服務(wù)不影響系統(tǒng)啟動,不然那可能導(dǎo)致系統(tǒng)無法正常啟動后果。

#!/bin/sh
/home/ubuntu/setup >> /home/ubuntu/test.log&

3. 啟動服務(wù)

systemctl start sandtable.service #啟動服務(wù)
 
systemctl status sandtable.service #查看服務(wù)是否啟動
 
systemctl enable sandtable.service #開機運行服務(wù)
 
systemctl is-enabled sandtable.service #查詢服務(wù)是否開機啟動

4 服務(wù)常用命令

systemctl is-enabled servicename.service #查詢服務(wù)是否開機啟動
 
systemctl enable *.service #開機運行服務(wù)
 
systemctl disable *.service #取消開機運行
 
systemctl start *.service #啟動服務(wù)
 
systemctl stop *.service #停止服務(wù)
 
systemctl restart *.service #重啟服務(wù)
 
systemctl reload *.service #重新加載服務(wù)配置文件
 
systemctl status *.service #查詢服務(wù)運行狀態(tài)

5.桌面系統(tǒng)的開啟與關(guān)閉

// 關(guān)閉桌面系統(tǒng)
sudo systemctl set-default multi-user.target
sudo reboot
 
// 打開桌面系統(tǒng)
sudo systemctl set-default graphical.target
sudo reboot

6. 桌面版設(shè)置的wifi 在下邊路徑進行修改替換即可

 /etc/NetworkManager/system-connections

到此這篇關(guān)于ubuntu開機自啟動服務(wù)設(shè)置的文章就介紹到這了,更多相關(guān)ubuntu開機自啟動內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • 配置apache默認使用ssl的方法

    配置apache默認使用ssl的方法

    首先確認mod_rewrite已經(jīng)安裝,方法就是查看你的httpd.conf,搜索“LoadModule rewrite_module modules/mod_rewrite.so”,如果有,刪除前面的"#"。
    2009-10-10
  • Linux cut 命令詳解

    Linux cut 命令詳解

    我們可以使用 cut 命令從一行字符串中于以字節(jié),字符,字段(分隔符)等單位截取一部分內(nèi)容出來。這篇文章主要介紹了Linux cut 命令的相關(guān)知識,需要的朋友可以參考下
    2020-07-07
  • linux?wget下載tomcat方式

    linux?wget下載tomcat方式

    這篇文章主要介紹了linux?wget下載tomcat方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2024-01-01
  • CentOS 5.4 Kloxo安裝詳細說明

    CentOS 5.4 Kloxo安裝詳細說明

    在centos上安裝過N次kloxo,總沒有成功,經(jīng)過幾次的折騰,終于安裝成功了。
    2010-03-03
  • Linux Apache設(shè)置壓縮及緩存

    Linux Apache設(shè)置壓縮及緩存

    本篇文章給大家詳細解說了Linux中Apache設(shè)置壓縮及緩存的方法,需要的朋友跟著學習下。
    2018-02-02
  • Linux中安裝Composer的步驟分享

    Linux中安裝Composer的步驟分享

    在本篇文章中小編給各位分享的是一篇關(guān)于Linux安裝 Composer的方法,有需要的朋友們可以學習下。
    2020-03-03
  • linux下虛擬機操作及輸入法設(shè)置方式

    linux下虛擬機操作及輸入法設(shè)置方式

    這篇文章主要介紹了linux下虛擬機操作及輸入法設(shè)置方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2023-06-06
  • Linux seq命令的使用詳解

    Linux seq命令的使用詳解

    這篇文章主要介紹了Linux seq命令的使用詳解,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-02-02
  • linux如何編譯安裝新內(nèi)核支持NTFS文件系統(tǒng)(以redhat7.2x64為例)

    linux如何編譯安裝新內(nèi)核支持NTFS文件系統(tǒng)(以redhat7.2x64為例)

    這篇文章主要介紹了linux如何編譯安裝新內(nèi)核支持NTFS文件系統(tǒng)(以redhat7.2x64為例),具有一定的參考價值,感興趣的小伙伴們可以參考一下。
    2016-10-10
  • linux對文件解壓或打包壓縮的方法

    linux對文件解壓或打包壓縮的方法

    這篇文章主要介紹了linux對文件解壓或打包壓縮的方法,非常不錯,具有參考借鑒價值,需要的朋友可以參考下
    2016-12-12

最新評論