Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

Linux 開機自動執行指令:修改 /etc/rc.local 實現

編輯:Linux 教學

在 Debian 系統驗證有效,其他發行版大同小異。

操作步驟:

  1. 以 root 權限編輯 /etc/rc.local:vi /etc/rc.local
  2. 在 exit 0 之前加入欲自動執行的指令(每行一條)。
  3. 儲存離開,確保檔案有執行權限(chmod +x /etc/rc.local)。

下次開機即會自動執行該腳本中的指令。

Copyright © Windows教程網 All Rights Reserved