How to Install Linux OS on USB Drive and Run it On Any PC

Ever thought of using any computer which is not yours, with all your personal stuff and configuration? It is possible with any Linux distribution. Yes! You can use your own, customized Linux OS on any machine with just a USB drive.

Read Also: How to Install CentOS 7 in a USB Drive

This tutorial is all about installing Latest Linux OS on your pen-drive ( fully reconfigurable personalized OS, NOT just a Live USB ), customize it, and use it on any PC you have access to. Here I am using Lubuntu 18.04 Bionic beaver for this tutorial (but, you can use any Linux distribution). So let’s gets started.


  1. One Pendrive 4GB or More (Let’s call it as Main USB drive/Pendrive).
  2. One more Pen drive or DVD disk to use as bootable Linux installation media.
  3. Linux OS ISO file, for example Lubuntu 18.04.
  4. One PC (Warning: Disconnect internal hard drives to prevent boot record alteration).

Important: While this procedure will not cause loss of data, some users have experienced changes to their internal drive’s bootup behavior depending on Linux distributions selected. To prevent any possibility of this occurrence, you may wish to disconnect your hard drive before continuing with the USB install portion of the tutorial.”

TIP: Use 32 bit Linux OS to make it compatible with any available PC.

That’s it! Go, and collect all of these. It’s time to do something new.

Step 1: Create Bootable Linux Installation Media

Use your Linux ISO image file to create a bootable USB installation media. You can use any software like Unetbootin, Gnome Disk Utility, Yumi Multi Boot, xboot, Live USB Creator, etc. to create bootable USB with the help of ISO image file.

Alternatively, you can use DVD disk by writing that ISO image to it (but that is the old school method).

Step 2: Create Partitions On Main USB Drive

You have to make two partitions on your Main USB drive using Gparted or Gnome Disk Utility, etc.

  • The root partition of format ext4 of size according to your use.
  • Optionally you can use the rest of the space as a FAT partition for using it as a normal USB drive.

I am having 16GB USB drive and I have created one root partition of 5GB and using rest 11GB as normal FAT partition. So my 16 GB USB drive is converted to 11GB drive for normal use on any PC. Sounds good!!!

This step you can do while installing Linux also, but it will be very complex while installing Operating Systems like Arch Linux.

Main USB Drive Partitions

Main USB Drive Partitions

Once you have created required partitions on the Main USB drive. Now take a deep breath because it’s time to go for Linux installation section.

Step 3: Install Linux on USB Drive

1. First, boot Linux OS (Lubuntu 18.04) from your bootable installation media and launch installation application from a live session. Live session of Lubuntu 18.04 will look like this.

Lubuntu Live Boot

Lubuntu Live Boot

2. Installer welcome screen will appear, select Language there and hit Continue.

Select Lubuntu Installation Language

Select Lubuntu Installation Language

3. Select Keyboard Layout and continue…

Select Lubuntu Keyboard Layout

Select Lubuntu Keyboard Layout

4. Select Wifi internet if you want to update Lubuntu while installation. I will skip it.

Select Wifi to Update Lubuntu

Select Wifi to Update Lubuntu

5. Select Installation Type and Third-party installation as per your choice and go to next..

Select Lubuntu Software Updates

Select Lubuntu Software Updates

6. Here select Something Else Option (It is Mandatory) and go to next…

Select Lubuntu Installation Type

Select Lubuntu Installation Type

7. This is an Important step, here you need to find out where your Main USB drive is mounted.

Find Main USB Drive

Find Main USB Drive

In my case /dev/sda are an internal hard disk of the PC and I am using /dev/sdb is USB Lubuntu Installation media from where this live session is booted.

And /dev/sdc is my Main USB drive where I want to install my Linux system and where I have made two partitions in step number 2. If you have skipped step 2, you can also make partitions in this window.

First, change the mount point of the first partition on this Main USB drive to ROOT (i.e. “ / ”). And as shown in the second red square select bootloader installation device as the Main USB drive.

In my case it is /dev/sdc. This is the most important step in this tutorial. If it is not done correctly your system will boot only on the current PC you are using, which is exactly opposite of your motivation to follow this tutorial.

Once it is completed, double-check it and hit continue. You will get a small window showing devices and drive which will be affected.

8. Make sure that the device and drives shown on this window are of your Main USB drive, which is in my case /dev/sdc. Hit continue

Write Partition Changes to Disk

Write Partition Changes to Disk

9. Now select your Region and hit Continue

Select Lubuntu Region

Select Lubuntu Region

10. Add username, password, and hostname, etc…

Create Lubuntu User

Create a Lubuntu User

11. Let the installation finish.

Lubuntu Installation

Lubuntu Installation

12. After completing installation hit restart and remove your installation media and press Enter.

Lubuntu Installation Completes

Lubuntu Installation Completes

13. Congratulations, you have successfully installed your own Linux OS on your pen drive to use it on any PC. Now you can connect a USB drive to any PC and start your system on that PC by simply selecting boot from USB option while booting.

Step 4: Customize the Lubuntu System

Now it’s time for fun. Just boot your system on any PC and start customizing. You can install any software you want. You can change Themes, Icon themes, install docker.

You can add and store your online accounts on it. Install/modify/customize whatever you want. All the changes will be permanent. They will not change or reset after rebooting or booting on other PCs.

The following figure shows my customized Lubuntu 18.04.

Lubuntu Running on USB Drive

Lubuntu Running on USB Drive

The main advantage of this method is you can use your personal stuff, your online accounts securely on any PC. You can even do secure online transactions as well on any available PC.

I hope it will be helpful for you, if you have questions regarding this article, please feel free to ask in the comment section below.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

130 Responses

  1. Javus says:

    Hello everyone,

    Thank you for this easy to follow tutorial. I could successfully install lubuntu 16.04 on a 8gb USB drive. To do so I used an old HP Pavillion dv5, a 32 bit machine. After do so I tested my new “mini USB computer” on the same machine and it works nicely even if it is very slow. I could even install and use i3wm which is my favourite window manager.

    However, when I try to use it on my main machine (Dell Precision M4600, 64 bit) it failed to find the USB drive and boot from it. I set up the boot sequence in the BIOS as I always did when I was a distro hopper, but nothing! Bootable USB device not found!

    To test whether it is a problem in the Dell settings for finding USB drives I inserted the USB drive burned with the lubuntu ISO I used as bootable Linux installation media and my computer found it immediately without any problem.

    I’m wondering whether the fact that I created my USB PC using a 32 bit machine is the cause behind the fact that I can’t use it in a 64 bit computer.

    Any idea?? Thanks

    • Ravi Saive says:


      May I think so, also no one uses 32-bit these days, so most of the apps are created for 64-bit only. I suggest you to re-install 64-bit Linux operating system using a 64-bit machine..

      • Javus says:

        Yes this was perhaps an issue, not sure about it. At the end I re-did the whole process from a 64bit machine and on a 32GB USB drive. I eventually found out how to boot from it also with my Dell Precision so everything more or less is working now.

        Just few last tweaks. I’m looking forward to work on it! It would be a lot easier to carry around only an UBS drive when visiting my family and then use my mom PC ;-)

        Well performances will be poor I guess… It’s slow, but I must admit that also the USB drive I’m using is not new, it has at least 5 or 6 years :-P

  2. Enrico Pallazzo says:

    It does not work for me. I am trying to make a Debian web server without GUI. I did everything as mentioned. My Disk is “sdh“, i made a partition sdh1 flagged "/", left the rest of the space for later partitioning, wrote bootloader into sdh, finished installing.

    After reboot it goes to GRUB and wants to start Debian and then it says: “Gave up waiting for file system

    Alert1 /dev/sdh1 does not exist” and then i am left in initramfs prompt.

    I think the problem is, that it is specifically looking for sdh1 instead of sdX1. Any idea?

  3. Mike Martone says:

    I am trying to create a boot-able USB Drive using a 9Gig Centos 7 Image. I tried a couple of tools but each one requires the USB to be formatted using FAT32 and FAT32 can only handle 4Gig files.

    Is there a way for me to create a bootable USB drive with a 9 Gig Centos 7 image?


  4. Anthony Ciantar says:

    does this not assume I am already using linux? I am a windows user.

  5. Steve R says:

    I would truly like to be able to have a Linux system on a stick but I have run into install failed 3 times. Twice the install failed because “GRUB Installation Failed. The ‘grub-efi-……….‘ package failed to install into /target/.

    Without the GRUB boot loader, the installed system will not boot”. I don’t have the exact grub-efi wording but the system I’m building this on is an ASUS U56E-RBL7, Windows 10 1803 with UEFI, Secure boot, fast start, 8GB RAM. I am wanting to use Linux Mint 19.1 Cinnamon.

    I have set up (partitioned) a 32 GB USB using GPARTED with 15GB Ext4 and 16GB FAT32. I thought I had gotten over the hurdle of Step 7 and setting the mount point. I reset both partitions same as before. The resulting partition table appeared ALMOST EXACTLY as in this tutorial image except that the FAT32 partition box in the format column was not checked.

    I tried repeatedly to change the partition but the box to format the partition would not change to be checked. The partition had been formatted previously so I left it as is. The installation began then shortly after tells me that I am setting up a UEFI installation and that it might be a problem for running on a BIOS system computer.

    My options were to proceed or to go back. Not sure what I would go back to anyway so I have selected the UEFI option. The installation proceeds all the way to the end, requests my signin info and then gives the error message. The USB will not boot and the computer opens directly into Windows.

    I’ve read many many websites about grub failing, etc. though these have all been on HDD installations. I have read about selecting GPT as the FAT32 partition type and I’ve seen options to set the Ext4 as a EFI partition type and one suggestion was to remove the live USB before proceeding with the installation.

    I’m stumped! I certainly don’t want to do anything to mess up the UEFI setting on the computer though I have entered system settings and selected UEFI as the first boot option and it works fine for the distro USB. I’d very much appreciate some direction. I feel certain the key is in step 7 but I don’t know which combination of options will magically fix the problem. Looking forward to hearing from you all and appreciate anything you might suggest.

    • Amit Nandkumar Hambar says:

      Once you have installed Linux on USB (any Ubuntu based Linux). Without restarting your PC (In live OS only), install one app called boot-repair with following Commands

      $ sudo add-apt-repository ppa:yannubuntu/boot-repair
      $ sudo apt-get update
      $ sudo apt-get install -y boot-repair && boot-repair

      Last command will install and open boot repair.

      Go to advanced option and select your main usb disk drive (Important), apply and click on recommended repair.

      Follow all the instructions properly. and after completion restart your system to usb drive.
      It will fix the problem.

  6. Carlos says:


    I tried this method, but it failed. It seems that the reason is because my machine uses UEFI.
    I explained the problem in details here:

    Can you please help me fix the boot? I would like to remove that ubuntu boot option from my internal disk (which wasn’t meant to be there, but in my USB drive).

    • tazmo8448 says:

      You may be able to ‘disable’ Secure boot in BIOS this is the UEFI microcode in boot

    • Amit Nandkumar Hambar says:

      You can try boot-repair app.
      Install it on Live OS without restarting after installation on main usb.

      $ sudo add-apt-repository ppa:yannubuntu/boot-repair
      $ sudo apt-get update
      $ sudo apt-get install -y boot-repair && boot-repair

      go to advanced option and select main usb drive and follow all the instructions by clicking Recommended repair.

  7. Rick Wade says:

    I have an old Asus netbook that had Windows XP. When that was no longer supported, I put Linux on it. I really don’t like Linux, so I turned it into a quasi-Chromebook (using Cloud Ready). However, I think it might be nice to have Linux available to have apps available that aren’t cloud-dependent.

    Do you see any problems with running it this way (after I create the USB using my Windows computer)? Are apps added when running off the flash drive and data downloaded/created saved on the flash drive?

  8. SaiRam says:

    I think only Live cd / live cd with /home persistence will be bootable on any pc. Once you install it, the way you did here, only relevant drivers for the hardware at the time of installation get installed. So, you can’t expect to boot from same pendrive on a different PC. It will possibly freeze !!

    I don’t know about lubuntu but puppylinux, antix & mxlinux are good at persistence with frugal install, (and can be booted on PCs with different hardware.)

  9. Zumbruk says:

    Is the resultant USB stick mountable on a Windows system, such that Windows can access the FAT partition? I’ve read that Windows won’t mount sticks formatted like this and offers to reformat them because it doesn’t understand the Ext4 partition at the beginning. I don’t have have a Windows system to try it on.

  10. Karol says:

    It works nicely on my laptop which I used for installation, but on my PC the system almost freezes after like 2 min or so. When I barely manage to launch task manager there is no load on CPU or RAM. Any idea what may be causing this?

    • Amit Nandkumar Hambar says:

      May be it is because of USB read write speed/ USB read write problem.

    • Rooster says:

      Maybe you didn’t installed the proper distribution x32 bits or it could be hardware issue, try to look for a refreshment setup or program that adapts to changes in the hardware environments

    • D says:

      Mine will freeze unless, upon boot, I press "e" and add "acpi=off" then it runs fine without freezing.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.