温馨提示×

ubuntu minimal怎么装软件

小樊
59
2026-09-07 09:31:32
栏目: 智能运维

在 Ubuntu Minimal(最小化安装,通常只有命令行、没有 GUI)里装软件,核心就是使用 APT 包管理器。下面按常见场景给你说明。


一、最基础的安装方式(APT)

1. 更新软件源(第一次务必执行)

sudo apt update

2. 安装软件

sudo apt install 软件名

例如:

sudo apt install curl wget vim git

3. 卸载软件

sudo apt remove 软件名

彻底卸载(含配置):

sudo apt purge 软件名

二、Ubuntu Minimal 常见“缺什么装什么”

Minimal 版通常没有这些,需要手动装:

网络工具

sudo apt install net-tools   # ifconfig
sudo apt install iproute2    # ip 命令

编辑器

sudo apt install vim

SSH(远程登录)

sudo apt install openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh

编译环境

sudo apt install build-essential

三、如果软件不在官方源里

1. 添加 PPA(示例)

sudo add-apt-repository ppa:用户名/ppa
sudo apt update
sudo apt install 软件名

2. 下载 .deb 安装

sudo apt install ./xxx.deb

或

sudo dpkg -i xxx.deb
sudo apt -f install

3. 用 snap(Minimal 可能没预装)

sudo apt install snapd
sudo snap install 软件名

四、图形界面(可选)

如果你想要桌面:

sudo apt install ubuntu-desktop

或轻量版:

sudo apt install xfce4

五、常用排查命令

apt search 关键字
apt show 软件名
which 命令名

如果你能告诉我:

  • 是 Ubuntu Server Minimal 还是 Ubuntu Minimal ISO
  • 想装 什么软件

我可以直接给你精确命令。

0 踩