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.

Requirements:

  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. bananahell says:

    is this so important use x32 version of Ubuntu? today all computers maintain amd64 architecture

  2. Randy Fry says:

    Wouldn’t you want a swap partition, if your using this on different computers which you may not know the specs of? Also how fast will this wear out a USB stick? Would something like zram be better?

  3. bruce davidson says:

    Wow – thank you for this article. The hard drive failed on my old Inspriron. With these instructions I was able to salvage my computer. So I’m using a 64gb usb3.0 to replace my hard drive.

    I use ElementaryOS, and I had one issue while installing, it failed at the end because it was trying to install Grub on the old hdd. I realized this was because I hadn’t created the fat32 partition, I didn’t see why I needed one. I used gparted to reformat the usb with a GPT partition table and followed the instructions at help.ubuntu.com/community/UEFI – Creating an EFI System Partition.

    It boots faster and loads programs faster than my old hard drive did. I’m not going to replace the hdd after all, I’ll just get a larger USB!

  4. Phil says:

    Hi, I tried your method which worked perfectly. However, the fat32 partition does not appear in windows (apparently because windows does not look after the first partition it sees, ext4 in our case).

    Do you know how the fat32 partition could be seen by windows ? I tried to set the fat32 before ext4 in partition table, but then the USB is not recognized as bootable anymore at startup.

  5. Greg says:

    OMG! If I were teaching you quantum physics, would you appreciate my telling you about the five different ways to do each calculation when you’re only interest is solving the problem? That would be a major no; however, you seem to think giving me an ocean of choices in how to format a usb, further skipping any procedures to get it and remove it from my PC once I’ve used it, and totally overshoot the whole getting the ISO image altogether. This are not instruction; it’s a book report…

    “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.”

  6. JJS says:

    I had a fault with GRUB not wanting to install at the end. I selected exactly like you /dev/sdb/ and a sandisk for the boot installation. (previous of courses i made the 2 partitions using gparted).

    I used Ubuntu Mate. But that should not make any difference. So installation went ok except for the GRUB. What can i do next, try it again. or is there an easy way to install GRUB? I have read you also need then some txt file so it know from which disk to boot.. Thanks for any help.

    • Amit Nandkumar Hambar says:

      Try to completely format your main usb (create new partition table with ms-dos format in Gparted). and then install it. Another thing is check whether your live installation usb is booted in UEFI or BIOS.

  7. Lorry says:

    After I complete installation, UBUNTU boots takes very long time, is it normal?

  8. Javus says:

    Did someone try the same procedure using some distros that should have been developed for this very purpose? I’m referring to Slax and Porteus. They might perform better than Lubuntu!

    Cheers,
    J.

  9. TMHD says:

    What about using it between AMD and Intel machines? I am thinking to install UBUNTU on USB SSD and use it between 3-4 different machines that one of them is Ryzen based. All are x64.

    • Ravi Saive says:

      @Tmhd,

      It should work without any issues on AMD and Inter machines, I have tested in on my Intel machine and now I am using it on any PC anywhere.

      • TMHD says:

        This is indeed interesting idea for those who use few machines during the day. Will give it a try with Linux Mint :) Thx

  10. BIDYUT CHAKRABORTY says:

    I have one old Compaq laptop (nx 6110) whose hard disk is not working. I wanted to use it as a Linux setup and work with python and use for my internet requirement. I was just going to buy one internal hard disk.

    Going through this post I feel that it will be very nice if I can use it using an USB drive. So, all I want to know that can I install Ubuntu 18.04 LTS on 32GB USB drive without caring for any hard disk?

    • Ravi Saive says:

      @Bidyut,

      Yes, you can install any Linux operating system on USB drive and use it anywhere on any PC. Just connect and use it..all data will be saved on USB disk..

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.