How to Install Ubuntu on a Fresh PC Using a USB Stick and Set Up Remote SSH Access
Originally created for my friend Vibhor. If someone stumbles across this and finds it useful, cheers!
This guide will walk you through the steps to install the latest version of Ubuntu on a new PC using a USB stick, connect to Wi-Fi, and enable SSH access for remote users.
What You'll Need
- A USB stick (at least 8 GB)
- A working computer to create the bootable USB
- An internet connection
- The target PC for installation
Steps to Install Ubuntu
1. Download Ubuntu
- Visit the official Ubuntu website
- Click "Download Ubuntu Desktop" and select the latest version
- Save the
.isofile to your computer
2. Create a Bootable USB
Insert the USB stick into your working computer
Use one of the following tools to create a bootable USB:
- Windows: Use Rufus
- macOS/Linux: Use balenaEtcher
Steps for Creating the USB:
- Using Rufus (Windows):
- Open Rufus and select your USB device
- Click "Select" and choose the Ubuntu
.isofile - Use default settings and click "Start"
- Using balenaEtcher (macOS/Linux):
- Open Etcher, select the Ubuntu
.iso, choose the USB stick, and click "Flash"
- Open Etcher, select the Ubuntu
- Using Rufus (Windows):
Wait for the process to complete and safely eject the USB
3. Boot the Target PC from USB
Insert the bootable USB stick into the target PC
Power on the PC and enter the BIOS/UEFI settings:
- Typically accessed by pressing
F2,F12,DEL, orESCduring startup - Refer to your PC's manual if unsure
- Typically accessed by pressing
Set the USB as the Boot Device:
- Navigate to the "Boot Order" or "Boot Options" menu
- Move the USB stick to the top of the boot priority list
- Save changes and exit
Restart the PC, and it will boot from the USB stick
4. Start Ubuntu Installation
- After booting, you'll see the Ubuntu boot menu
- Select "Try or Install Ubuntu" and press Enter
5. Connect to Wi-Fi
- On the Ubuntu installer screen, click the Wi-Fi icon in the top-right corner
- Select your Wi-Fi network from the list
- Enter the password and click "Connect"
- Ensure the PC is connected to the internet before proceeding
6. Install Ubuntu
- Language Selection: Choose your preferred language and click "Install Ubuntu"
- Keyboard Layout: Select your keyboard layout and click "Continue"
- Updates and Software:
- Choose to install updates and third-party software (recommended)
- Click "Continue"
- Installation Type:
- For a fresh PC, select "Erase disk and install Ubuntu"
- For advanced users, choose "Something else" to customize partitions
- Confirm Changes: Review the partition setup and click "Install Now". Confirm if prompted
- Set Your Time Zone: Select your region on the map
- Create a User Account:
- Enter your name, computer name, username, and password
- Choose whether to log in automatically or require a password
- Installation: Wait for the installation to complete (10–20 minutes)
- Restart: Remove the USB stick when prompted and press Enter to restart
Post-Installation Setup
1. Connect to Wi-Fi (if needed)
- After booting into Ubuntu, click the Wi-Fi icon in the top-right corner
- Select your network, enter the password, and connect
2. Update the System
Open the terminal (Ctrl + Alt + T) and run:
3. Install and Configure SSH
- Install SSH Server:
- Verify SSH Service:
If it's not running, start it:
[object Promise]- Enable SSH on Boot:
4. Find the PC's Public IP Address
Open the terminal and run:
[object Promise]Note: This public IP address is required for remote SSH access.
5. Configure Router for Port Forwarding
- Log in to your router's admin panel (usually 192.168.x.x or 192.168.1.1)
- Locate the Port Forwarding section
- Forward port 22 to your PC's local IP address:
- Find your local IP with:
- Look under inet for your Wi-Fi interface
- Save the changes
6. Secure SSH
Enable Password Authentication (default method):
- Open the SSH configuration file:
- Find and modify these lines:
- Save the file (
Ctrl + O, thenEnter, thenCtrl + X) and restart SSH:
Change Default SSH Port (optional extra security):
[object Promise]Find the line
#Port 22and change it to a custom port, e.g.,Port 2222Save the file (
Ctrl + O, thenEnter, thenCtrl + X) and restart SSH:
7. Connect Remotely via SSH
- From the remote machine, connect to your Ubuntu PC:
- If you changed the SSH port, specify it:
- When prompted, enter your Ubuntu user account password
Your PC is Ready
Congratulations! You've successfully installed Ubuntu, connected to Wi-Fi, and enabled SSH access for remote users.
PS. Huge thanks broda, I owe you one 🫶