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 禁用不需要的服务以加快启动速度。请谨慎操作——禁用关键服务可能会导致功能异常。