Operations 12 min read

Fresh Ubuntu Install? Complete Guide from Boot to Coding in 30 Minutes

A step-by-step tutorial for Ubuntu beginners covering LTS version selection, post-install essentials (apt mirror switch, system update, GPU drivers, Chinese input method, fonts), development environment setup (Git, Python with venv, Node.js via nvm, Docker, VSCode), common pitfalls like DNS errors and driver black screens, and survival habits including Timeshift snapshots and config backups.

Ubuntu
Ubuntu
Ubuntu
Fresh Ubuntu Install? Complete Guide from Boot to Coding in 30 Minutes

01 Choose the Right Ubuntu Version

Stick to LTS (Long Term Support) releases for stability. The current latest LTS is Ubuntu 26.04 with five years of standard support. Interim releases like 26.10 only get nine months of support and are meant for testing new features, not daily driver use.

Download the Ubuntu Desktop ISO from ubuntu.com. Write it to an 8 GB+ USB drive using Rufus (Windows) or balenaEtcher (cross-platform), then boot and install. When the partition screen appears, choose "Erase disk and install Ubuntu" — manual partitioning is a common data-loss trap for newcomers.

02 Five Mandatory Post-Install Steps

1. Switch APT Mirrors

Ubuntu defaults to overseas package servers, which are painfully slow in China. Switch to a domestic mirror. Critical note: most online tutorials are outdated. Since Ubuntu 24.04, APT uses the DEB822 format; the real configuration lives at /etc/apt/sources.list.d/ubuntu.sources, while /etc/apt/sources.list is empty on 26.04. Editing the old file does nothing.

Easiest method: open "Software & Updates", go to the "Ubuntu Software" tab, change "Download from" to "Other Site", click "Select Best Server" or manually enter mirrors.tuna.tsinghua.edu.cn or mirrors.aliyun.com. The GUI rewrites the correct file automatically.

Command-line alternative:

sudo cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak
sudo sed -i 's|archive.ubuntu.com|mirrors.tuna.tsinghua.edu.cn|g' /etc/apt/sources.list.d/ubuntu.sources
sudo apt update

Verify the change by running apt update and checking that the listed domains now point to the mirror.

2. Update the System

sudo apt update && sudo apt upgrade -y

The first command refreshes package lists; the second upgrades all installed packages. Doing this immediately after install avoids many mysterious bugs.

3. Install GPU Drivers (NVIDIA)

Run ubuntu-drivers devices to see recommended drivers. Install the one marked "recommended" with: sudo ubuntu-drivers install Reboot afterward. AMD and integrated graphics usually work out of the box with the open-source drivers already included.

4. Configure Chinese Input Method

Start with the simplest path: GNOME's built-in IBus framework plus Intelligent Pinyin. sudo apt install ibus-libpinyin Then open Settings → Keyboard → Input Sources, click +, choose Chinese → Intelligent Pinyin. Log out and back in. Switch with Super+Space. This zero-config approach works for most users in five minutes.

For advanced needs (larger dictionaries, custom candidate counts, professional vocabularies), the article notes a future guide will cover Fcitx5 + Rime.

5. Install Chinese Fonts

Minimal installs may lack CJK fonts, causing square boxes (tofu) instead of characters. Fix with:

sudo apt install fonts-noto-cjk fonts-noto-cjk-extra

03 Set Up a Development Environment

Git

sudo apt install git
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

Python

Ubuntu ships Python 3. Only add pip: sudo apt install python3-pip Best practice from day one: use venv to isolate project dependencies instead of polluting the system Python.

python3 -m venv .venv
source .venv/bin/activate

Version conflicts across projects are a top beginner pitfall.

Node.js

Do not use apt — the repository version is too old. Use nvm (Node Version Manager):

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Restart the terminal, then install the current LTS:

nvm install --lts

Docker

Official convenience script:

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER

The second command lets you run Docker without sudo; log out and back in for it to take effect. The article flags that piping curl | sh requires trusting the remote content; security-conscious users can instead add Docker's official APT repository (more steps, more control).

VSCode

Download the .deb package from the official site and open it with "Software Install". It's the most hassle-free editor on Linux. After installing, add the Python and ESLint extensions.

At this point Git, Python, Node.js, Docker, and VSCode are all ready for coding.

04 Common Beginner Pitfalls

sudo apt update

fails with "Could not resolve domain" — check physical network connection first.

Black screen after NVIDIA driver install — driver/kernel mismatch. Boot into recovery mode, remove the broken driver with sudo apt remove --purge 'nvidia-*' (quotes prevent shell glob expansion), then reinstall a compatible version. apt hangs at "Waiting for dpkg" — another package manager process is stuck. Run sudo dpkg --configure -a to clear the lock.

Chinese characters show as boxes — missing fonts; revisit step 5 above. rm -rf on the wrong path — Linux has no undo. Habit: ls the exact path before deleting. Keep regular backups of important data.

Forgotten sudo password — it's the same as your login user password, not a separate one.

05 Three Survival Habits

Enable Timeshift system snapshots. It's the Linux equivalent of Windows System Restore. Install with sudo apt install timeshift. Create a snapshot right after install and again after the dev environment is ready. If a config change breaks the system, roll back in one click.

Back up personal files separately. Timeshift only protects system files. Store documents and code on an external drive or cloud sync.

Back up config files before editing. The

.bak</copy> pattern used in step 1 (<code>cp file file.bak

) saves hours of re-installation.

06 What to Learn Next

Spend ten minutes mastering terminal shortcuts, man pages, and history — these fundamentals pay off more than any fancy tool. Then pick a real project (a blog, a scraper, anything) and build it; hands-on work beats reading ten tutorials.

The article promises follow-up guides on advanced input methods (Fcitx5 + Rime), command-line productivity, and desktop customization.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerPythonNode.jsLinuxdevelopment environmentVSCodesystem administrationaptUbuntubeginner tutorialTimeshiftIBusNVIDIA drivers
Ubuntu
Written by

Ubuntu

Focused on Ubuntu/Linux tech sharing, offering the latest news, practical tools, beginner tutorials, and problem solutions. Connecting open-source enthusiasts to build a Linux learning community. Join our QQ group or channel for discussion!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.