快轉到主要內容

systemctl

·126 字·1 分鐘·
PolloChang
作者
PolloChang
我是一隻雞

變更 systemctl 默認編輯器
#

1
sudo update-alternatives --config editor

執行結果

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
root@example:~# sudo update-alternatives --config editor
There are 3 choices for the alternative editor (providing /usr/bin/editor).

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/nano            40        manual mode
  2            /usr/bin/vim.basic   30        manual mode
  3            /usr/bin/vim.tiny    15        manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/editor (editor) in manual mode

同檔名優先權
#

/etc/systemd/system/lib/systemd/system 有相同服務檔案名,會優先使用 /etc/systemd/system 路徑中的內容。