温馨提示×

怎样配置ubuntu minimal

小樊
45
2026-09-01 09:23:19
栏目: 智能运维

Ubuntu Minimal(最小化安装)通常指:

  1. Ubuntu Server(无桌面) —— 官方最小系统
  2. Ubuntu Minimal ISO(mini.iso) —— 极简网络安装
  3. Ubuntu Desktop 的 Minimal 安装选项 —— 桌面但最少软件
  4. 手动最小化(最小化容器/云镜像)

下面按常见场景说明配置方法。


一、使用 Ubuntu Server(推荐)

1. 下载

https://ubuntu.com/download/server

2. 安装

  • 启动 → 选 Ubuntu Server
  • 在软件选择界面:
    • 取消 Ubuntu Server with GUI
    • 只保留 OpenSSH Server(如需)

3. 基础配置

sudo apt update
sudo apt upgrade -y

二、使用 Ubuntu Minimal ISO(mini.iso)

⚠️ 注意:
从 Ubuntu 20.04 起,官方已停止维护 mini.iso
可用 Ubuntu Server + 手动精简 替代

如仍使用旧版本:

# 安装基础系统
tasksel
# 只选: Basic Ubuntu Server

三、桌面版 Minimal 安装

Ubuntu 22.04 / 24.04 Desktop

安装时:

  • 选择 Minimal installation
  • 不安装办公、游戏、浏览器等

安装后清理:

sudo apt purge libreoffice* thunderbird* rhythmbox* -y
sudo apt autoremove --purge -y

四、手动最小化(高级)

1. 只装核心

sudo apt install --no-install-recommends ubuntu-minimal

2. 移除无用组件

sudo apt purge snapd apport whoopsie -y
sudo apt autoremove --purge -y

3. 禁用服务

sudo systemctl disable bluetooth
sudo systemctl disable cups

五、云 / 容器最小化

Docker

FROM ubuntu:24.04
RUN apt update && apt install -y --no-install-recommends \
    ca-certificates && rm -rf /var/lib/apt/lists/*

Cloud Image

https://cloud-images.ubuntu.com/minimal/


六、推荐最小包集合

sudo apt install \
  openssh-server \
  vim \
  curl \
  net-tools \
  ufw

如果你告诉我:

  • Ubuntu 版本
  • 用途(服务器 / 桌面 / 容器)
  • 是否要 GUI

我可以给你精确的最小配置方案

0