Linux Lite Wiki

系統

日誌位置

Linux Lite 將系統日誌儲存於 /var/log/。

重要的日誌檔案:

使用 less、cat 或 tail 來讀取日誌:

sudo less /var/log/syslog

Lite 系統監視器

Linux Lite 中的工作管理員提供執行中程序與系統使用狀況的圖形化檢視介面。

開啟方式:

您可以:

若需要更詳細的圖形化介面,可透過 Lite Software 或 Synaptic 安裝 System Monitor。

top、htop、journalctl

top:
一個內建的終端機工具,可顯示即時的系統資源使用情況。

top

按下 q 退出。

Btop:
top 的增強互動版本,具備更佳的視覺效果。使用以下方式安裝:

journalctl:
用於查詢來自 systemd 的日誌。

範例:

journalctl             # View all logs
journalctl -b          # Logs from current boot
journalctl -u servicename.service  # Logs for a specific service
journalctl -xe         # View recent critical logs

使用方向鍵或 PgUp/PgDn 捲動。

系統服務

Linux Lite 使用 systemd 作為其 init 系統,以管理開機及執行期間的服務。

主要的 systemctl 指令:

systemctl status           # Overview of services
systemctl status ssh       # Status of specific service
systemctl start service    # Start a service
systemctl stop service     # Stop a service
systemctl restart service  # Restart a service

查看所有已啟用的服務:

systemctl list-units --type=service

啟用/停用 SystemD 服務

若要在開機時啟用某項服務:

sudo systemctl enable service

若要停止某項服務在開機時啟動:

sudo systemctl disable service

這些指令對於管理背景常駐程式(例如網路、列印或排程工作)至關重要。

開機最佳化

若要分析開機效能:

systemd-analyze

若要查看哪些服務拖慢了開機速度:

systemd-analyze blame

您可以使用 systemctl 停用不必要的服務,以加快開機時間。請謹慎操作——停用重要服務可能導致功能異常。