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
The Complete Linux System Administrator Bundle
Become an Ethical Hacker Bonus Bundle

You may also like...

153 Responses

  1. DK says:

    What would happen if I don’t partition the Pendrive first and just install it on the pen drive right away?

    • tazmo8448 says:

      It will install itself as a Linux version. You only need to partition it if you want to use the space for something else like FAT32. If you don’t care then it will take the whole Pendrive up on installing Linux or whatever you choose.

      • DK says:

        It doesn’t matter to me if the File System is in ext4 format. So, should I go with installing it without the partitioning?

        • tazmo8448 says:

          I’ve installed several ‘Full Installs’ using the complete USB. the partitioning thing is if you want to use space for other things.

  2. db says:

    So if you understand the terminology and know how it works then this article is fine. if you don’t know the terminology and don’t know how it works then unless the installer makes it obvious you’re going to have a painful time.

  3. Nigel says:

    I really like lubuntu running from the iso image on a USB, but of course with no persistence. But it works perfectly. Every time I follow the instructions above installing on a 2nd USB (tried several) the resulting stick will not boot. Does anyone have any troubleshooting advice? Using an older BIOS machine. Thanks!

    • tazmo8448 says:

      Are you trying to run the other USB’s on a different machine than the one that your original USB worked on? You say the 1st one worked but others made do not, so I’m thinking you’re creating them for another PC.

      If so, it seems you need to go into the BIOS settings and allow the USB to be ‘seen‘ in the Boot Options. Sometimes on older PCs that need Legacy enabled. Check out your Boot Options on the older machine and make sure you can verify that the USB is showing.

  4. Zafar says:

    @Ravi Sive,

    Really? Why do I need an efi partition? Please

    • Bobcov says:

      I think it’s because modern BIOS firmware won’t see your USB stick as a bootable option if the EFI partition is not present with the boot files needed to continue the boot process.

  5. Tom M. says:

    Thanks for this article. Only one thing I am missing: can You extend this tutorial with after install procedures necessary for preventing GRUB from looking for another OS? Otherwise, every time I run an update/upgrade of the system on my USB stick, it will collect all OS’s on other drives and put it in the GRUB menu. As I looked for this issue, it is advised to disable os-prober in GRUB config…

  6. Arun says:

    Good article. What is the difference between this installation approach and installing on USB with persistence using a utility like say Linux Live USB creator?

    • bob says:

      The difference I have found is that you cannot update the kernel because of the lack of a partition which the update process can access. To get around that, I tried to modify an ISO with an updated kernel using a utility I found, but it did not work.

  7. wolfo says:

    so, how can I install it using EFI?! creating /boot/efi on usb stick with a EFI partition?

  8. Arnav Bule says:

    How do I install Arch Linux on my 1 TB sony hard drive? (i want to create a partition of 25-50gb for it, using my windows 10 pc ). I shall be able to play a few games on the Pendrive.

  9. Freeman says:

    In Laptop Bios-Dell, with F2! I have System Configuration and then Devices> SATA & SSD-PCIes both connected. I can disable SATA & SSD-PCIes (forgot the exact name). Disabling SATA in bios could work?? Does the system really thin it is physically removed??? Should I have to disconnect SSD_PCIes too? I just don’t want a hit my main system too.

    So far I made the recovery disk, then deselect SATA in bios. after that I rebooted and Enable SATA option again, again rebooted, There is not boot to the system , the system just got black, therefore, I again go to bios and restore default settings and then It again win boot manger comes and I am in win 10.

  10. Freeman says:

    Fellas! thanks for responses. I did message earlier but don’t know why it’s not updated. @MIhvoi, I used your suggestion. I noticed that when I boot from USB-Debian, mount point /boot/efi was of my Internal Hard Disk. I mount my USB-EFI partition to /media/esp and then cp the EFI/boot & EFI/Debian from EFI-Internal-Hard to my USB-EFI.

    Then changed the UUID in /etc/fstab to my USB-Partition. OK. Then when on boot I pressed F12, a new option comes which is UEFI-***USB-Sandisk, with already options (Win Boot manager & Debian (this entry was created automatically on the time of installation)).

    When I select to UEFI-***USB-Sandisk, option then my pc restart and a new entry would be created and then boot into USB. I think it should straight enter into grub and then boot to Debian when choose to boot from the UEFI-***-USB-Sandisk option.

    It should not restart and create a new entry in Internal-Hard-disk-EFI! The USB should be standalone. Thanks. another hit… I also have an old UEFI type Dell laptop year 2012. This USB appeared an option to boot from UEFI-***_USB_Sandisk, but when I used this option then it becomes just an error black screen and there is no restart and creating entries. Any Suggestion Further?

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.