Installing Ubuntu Linux onto a USB stick will allow you to have a portable operating sysem that you can plug into any computer. This differs from a live environment USB, as installing Ubuntu directly to a USB stick will create a persistent operating system, the same way it does when you install to a typical hard disk. However, the process of installing Ubuntu to USB is not the same as a usual hard drive.
There are some differences in the installation process and important caveats to keep in mind if you plan to install Ubuntu to a USB stick. We will go over those in the sections below. In this tutorial, we will cover the step by step instructions to install Ubuntu Linux to a USB flash drive.
In this tutorial you will learn:
- How to install Ubuntu on USB Stick

| Category | Requirements, Conventions or Software Version Used |
|---|---|
| System | Ubuntu Linux |
| Software | N/A |
| Other | Privileged access to your Linux system as root or via the sudo command. |
| Conventions |
# – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command$ – requires given linux commands to be executed as a regular non-privileged user |
Important things to keep in mind
Before you go forward with installing Ubuntu to USB, keep these things in mind:
- Your flash drive should be USB 3.0, or the speed of the operating system will be painfully slow
- You will need two flash drives – one as a bootable USB to install Ubuntu, and the other to install Ubuntu onto
- You may need to disable secure boot on PCs in order to boot from the USB, since it will contain its own EFI partition
The installation process will differ slightly from a usual one because we will need to temporarily disable the ESP flag on the current hard drive. This is because Ubuntu will not allow us to install an EFI bootloader onto the USB drive if one already exists on the system’s hard drive. The workaround is to temporarily disable the ESP flag, install Ubuntu to USB, and then re-enable the ESP flag afterwards.
How to install Ubuntu on USB Stick step by step instructions
We will be using “USB 1” to refer to the USB stick that is acting as an Ubuntu installer, and “USB 2” to refer to the USB stick on which we will be installing the persistent Ubuntu.
- The first thing we will need to do is create a bootable USB Ubuntu stick. Download Ubuntu and then use the following dd command syntax to copy the contents over to USB 1.
$ sudo dd bs=4M if=/path/to/ubuntu.iso of=/dev/sdX status=progress oflag=sync
Of course, replace
/path/to/ubuntu.isowith the path to your ISO file, and replace/dev/sdXwith the name of your device.
[REST OF CONTENT REMAINS EXACTLY THE SAME]
In this tutorial, we saw how to install Ubuntu Linux on a USB stick. While the performance is not nearly as good as installing Ubuntu to a traditional hard disk, it is a unique solution that allows us to carry around a full, persistent Linux installation in our pocket, and we would say that is pretty cool.