How to Install Ubuntu Without GUI
In this article
Yes, you can install Ubuntu without a graphical desktop environment. This gives you a minimal, fast, and secure server or development base. The official Ubuntu Server installer does exactly this—it installs the core system plus a command-line interface, no GUI. Here's how to do it, from downloading the ISO to first login.
What You'll Need
- A computer (or virtual machine) with at least 2 GB RAM and 10 GB free disk space.
- A USB drive (4 GB or larger) or a DVD to create bootable media.
- Another computer with internet access to download the ISO.
- Software to write the ISO to the USB drive (e.g., Rufus on Windows, Etcher on macOS/Linux).
- Basic familiarity with the command line and partitioning.
Step-by-Step
- Download the Ubuntu Server ISO. Go to ubuntu.com/download/server and download the latest LTS (Long Term Support) version. This ISO is designed for servers and does not include a GUI by default.
- Create bootable media. Insert your USB drive. Use Rufus (Windows) or Etcher (macOS/Linux) to write the ISO to the USB. Make sure to select the correct drive—this will erase all data on it.
- Boot from the USB. Restart your computer and enter the boot menu (usually by pressing F12, F2, Esc, or Del during startup—check your manufacturer's manual). Select the USB drive as the boot device.
- Choose “Install Ubuntu Server”. When the GRUB menu appears, select the first option to start the installer. It runs in text mode; no GUI will load.
- Select your language and keyboard layout. Use arrow keys and Enter to navigate. Choose your region and keyboard variant (e.g., “English (US)”).
- Configure the network. The installer will try to get an IP via DHCP. If you need a static IP, select “Edit” and enter the details manually. Write down the IP address—you may need it later.
- Set up a proxy (optional). If you're behind a proxy, enter its URL; otherwise leave blank and continue.
- Configure the storage. Choose “Use an entire disk” for automatic partitioning. If you need custom partitions, select “Custom storage layout” and create partitions manually (e.g., /, /home, swap). For most, automatic is fine.
- Confirm the disk setup. The installer will show a summary. Select “Done” and confirm that you want to erase the disk. This will delete all existing data on the selected drive.
- Set your profile. Enter your name, a username, and a strong password. Choose a hostname (e.g., ubuntu-server).
- Skip Ubuntu Pro. You'll be asked to set up Ubuntu Pro. You can skip this by selecting “Skip for now”.
- Install OpenSSH server (recommended). When prompted, select “Install OpenSSH server” if you want remote access. This is optional but useful for headless management.
- Skip snap store and other snaps. The installer may ask about installing snaps. You can skip these to keep the system minimal.
- Reboot. After installation completes, remove the USB and select “Reboot”. The system will boot to a text console with a login prompt.
- Log in. Enter your username and password. You'll see a shell prompt. Your Ubuntu system is now running without a GUI.
Common Mistakes
- Choosing the desktop ISO. The standard Ubuntu ISO includes a GUI. Make sure you download the “Server” edition.
- Not backing up data. The installer erases the entire disk. Always back up important files before starting.
- Incorrect boot media. If the USB doesn't boot, it may not be written correctly. Re-flash it with a tool like Rufus in DD mode (not ISO mode) on Windows.
- Selecting the wrong disk. In the partitioning step, double-check the disk name and size. Choosing the wrong drive will wipe it.
- Forgetting to install OpenSSH. If you plan to access the server remotely, you must install OpenSSH during setup. You can install it later with
sudo apt install openssh-server, but it's easier during install.
Tips
- Use a wired connection. During installation, a wired Ethernet connection is more reliable than Wi-Fi. If you must use Wi-Fi, the installer will ask for the SSID and password.
- Take note of the IP address. After boot, you can find it with
ip aorhostname -I. This is essential for SSH. - Update the system. After login, run
sudo apt update && sudo apt upgradeto get the latest security patches. - Install a GUI later if needed. You can add a desktop environment later with
sudo apt install ubuntu-desktop, but that defeats the purpose of a minimal install. If you want a lightweight GUI, consider installing a window manager like i3 or Openbox. - Use a swap file. If you have limited RAM, the installer creates a swap file by default. You can adjust it later with
sudo fallocate -l 2G /swapfileandsudo mkswap /swapfile.
Troubleshooting
If the installer doesn't boot
- Check that the USB is properly flashed. Try re-flashing with a different tool.
- Disable Secure Boot in BIOS/UEFI settings. Some systems fail to boot Linux with Secure Boot enabled.
- Try a different USB port (preferably USB 2.0).
If the installer hangs or crashes
- Restart and try again. Sometimes a bad ISO download is the cause—verify the SHA256 checksum on the download page.
- If it happens at the partitioning step, check that the disk is not faulty. Try a different disk if possible.
If you can't log in after reboot
- Check that you're using the correct username and password. Remember, the username is the one you set, not “root”.
- If you forgot the password, reboot, hold Shift to get to GRUB, select “Advanced options”, then “Recovery mode”, and choose “root” to reset it.
If the network doesn't work
- Run
ip linkto see network interfaces. If the interface is down, runsudo ip link set.up - Check if a DHCP client is running:
sudo dhclient. - If you set a static IP, verify the gateway and DNS settings in
/etc/netplan/(look for a YAML file).
If you want a GUI after all
- You can install a minimal GUI with
sudo apt install xorg openboxand then start it withstartx. Or install a full desktop withsudo apt install ubuntu-desktop.
Frequently Asked Questions
Can I install Ubuntu without a GUI on a machine that already has Windows?
Yes. During partitioning, choose “Manual” and shrink the Windows partition to make space for Ubuntu. However, dual-booting is more complex and requires careful partitioning. It's safer to use a separate disk or a virtual machine.
Is Ubuntu Server free?
Yes, Ubuntu Server is free and open-source. You can download and use it without paying any fees.
How do I install a GUI later if I change my mind?
Run sudo apt update && sudo apt install ubuntu-desktop. This will install the full GNOME desktop. Reboot and you'll have a graphical login.
What is the default username and password?
There is no default. You create the username and password during installation. The root account is locked by default; use sudo for administrative tasks.
Can I use Wi-Fi with Ubuntu Server?
Yes, but you must configure it manually after installation. Use sudo apt install wpasupplicant and edit the netplan configuration to add your Wi-Fi network details. It's easier to use a wired connection during setup.
How do I shut down or reboot from the command line?
Use sudo shutdown now to power off, or sudo reboot to restart. You can also use sudo halt for immediate shutdown.