Installing your first Linux system step by step
Setting Up First Linux Distro
I’ll assume you want a clean, reliable start. This guide is a practical primer for setting up Linux. I keep it hands-on and short. I cover choosing a distro, concrete installation tips, basic security and firewall rules, and backup patterns that actually work.
Choosing a distro and preparing the media
Pick a distro that matches your goals and patience. If you want something that Just Works, choose Ubuntu LTS or Linux Mint. If you want newer packages with a friendly installer, try Fedora Workstation or Pop!_OS. If you love tinkering and understand the command line, Arch is brilliant, but it is not a beginner guide. Name the task you want to do first. That will narrow the choice.
Download the ISO from the project site. Check the SHA256 or signature. Don’t skip that step. A corrupt ISO wastes time and can brick an installer. For a GUI tool to write the image, I use balenaEtcher.
On an existing Linux box, dd works fine if you know the syntax:
sudo dd if=path/to.iso of=/dev/sdX bs=4M status=progress && sync
Replace /dev/sdX with the USB device. Get this wrong and you overwrite a drive.
Decide desktop or no desktop. For a laptop, pick a desktop environment with good power management, like GNOME or Cinnamon. For a lightweight machine, try XFCE or LXQt. Consider hardware support. Test Wi-Fi, graphics and suspend in a live session before installing. If the live image struggles with Nvidia, research the proprietary driver route. That saves time.
Plan your partitions. A safe, simple layout:
- EFI partition (if UEFI): 512 MB, fat32.
- Root / : 30–50 GB is fine for most installs.
- Home /home : remainder, unless you prefer a single root.
- Swap: use a swapfile instead of a swap partition unless you need hibernation. If you need hibernation, match swap size to RAM.
If you want disk encryption, enable full-disk LUKS during installation. It costs little in performance and protects your data if the machine is lost.
Install, secure and maintain — practical steps
1) Install with intent. Boot the installer. Choose manual partitioning only if you planned layouts. If you are uncertain, use guided partitioning. Create a standard, unprivileged user during install. I avoid using the root account for daily work.
2) Post-install checklist. After first boot, do these tasks immediately:
- Install updates. For Ubuntu/Debian:
sudo apt update && sudo apt upgrade -y
For Fedora:
sudo dnf upgrade –refresh
For Arch:
sudo pacman -Syu - Create an SSH key if you’ll access the machine remotely:
ssh-keygen -t ed25519 -C “youremail”
Use ssh-copy-id or manually append the public key to ~/.ssh/authorizedkeys. - Remove unnecessary services that listen on ports. Check with:
ss -tuln
3) Firewall rules. Start simple and safe. On Ubuntu, I use ufw because it is clear and scriptable.
- Install and enable ufw:
sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw enable
That blocks unwanted inbound traffic and allows outbound access. If you run a web server, add:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
On Fedora, firewalld is common. Match the same principle: block by default, allow what you need. Keep firewall rules minimal and explicit.
4) User and sudo policy. Use a separate local account for daily work. Grant sudo only when needed. Check sudoers with visudo and avoid NOPASSWD for broad privileges.
5) Snapshots and backup patterns. Backups save you hours. Pick one or two reliable approaches and test restores monthly.
- File-level backups with rsync. Example to an external drive:
rsync -aAX –delete /home/ /media/backup/home/
Run this in a cron job or systemd timer. The –delete flag mirrors the source, so be careful and test. - Snapshots for system state. Timeshift works well for desktop systems using rsync or BTRFS snapshots. Use it before major upgrades.
- Deduplicating encrypted backups. For off-site backups, borgbackup or restic are good. Initialise a repo and run regular backups. Test a restore to confirm integrity.
Apply the 3-2-1 pattern: at least three copies, two different media, one off-site. Name a single restore point you know works and practise restoring it.
6) Automatic updates and package hygiene. For desktops, enable automatic security updates if you prefer minimal maintenance. For servers, I prefer manual updates with regular scheduling so I can check breaking changes. Remove unused packages with apt autoremove or the equivalent. Keep snaps and flatpaks in check; they can consume disk space.
7) Drivers and firmware. For systems with discrete GPUs, install the vendor driver from the distro’s official repos or its “additional drivers” tool. For strange Wi-Fi or Bluetooth issues, check dmesg and the hardware vendor’s Linux support notes. Firmware updates sometimes land in the linux-firmware package. Do not install random driver packages from obscure sources.
8) Troubleshooting and recovery. Keep a live USB handy. Know how to chroot into your system for repairs. Keep an up-to-date list of sudo commands you use often. For boot issues, check the journal with:
journalctl -b -1
for the previous boot. For broken package states, use the distro’s recovery docs.
Final checklist (quick):
- Chosen distro and verified ISO.
- Bootable USB created and tested.
- User account created, root locked.
- Swapfile or hibernation configured.
- Disk encryption if needed.
- Firewall rules in place and tested.
- SSH key auth set up.
- Backup pattern implemented and restore tested.
- Regular update plan defined.
If you follow those steps, setting up Linux will be far less stressful. You get a sensible system that is secure, recoverable and flexible. That is the point of a good first install.
0 Comment