ubuntu

ubuntu minimal定制化教程

小樊
41
2025-05-24 00:12:22
栏目: 智能运维

Ubuntu Minimal 是一个轻量级的 Ubuntu 发行版,它只包含最基本的系统工具和应用程序,非常适合需要最小化系统资源占用的用户,如服务器、物联网设备或开发者。以下是关于 Ubuntu Minimal 定制化的教程:

安装 Ubuntu Minimal 的步骤

  1. 下载 Ubuntu Minimal ISO
  1. 制作启动 U 盘
  1. 启动安装程序
  1. 分区配置
  1. 完成安装

定制化 Ubuntu Minimal

#!/bin/bash
# 设置时区
echo "Setting timezone..."
timedatectl set-timezone Asia/Shanghai
# 更新软件包列表
echo "Updating package list..."
apt-get update
# 安装基本软件包
echo "Installing basic packages..."
apt-get install -y \
    ubuntu-minimal \
    ca-certificates \
    netbase \
    openssh-server \
    vim \
    wget \
    curl \
    htop
# 配置 SSH 服务
echo "Configuring SSH service..."
systemctl enable ssh
systemctl start ssh
# 创建新用户(可选)
echo "Creating a new user (optional)..."
read -p "Enter username: " username
useradd -m -s /bin/bash $username
passwd $username
# 提示完成
echo "Minimal Ubuntu setup complete!"

常用命令大全

请注意,Ubuntu 版本更新较快,具体步骤和界面可能会随版本不同而有所变化。建议在安装前查阅最新的官方安装指南。

0
看了该问题的人还看了