How to install programs on USB stick?
I have Ubuntu on pen drive. I was wondering why there is an installation app on the desktop. Is that for installing other programmes like chrome browser? When I click this, will it not install on my hard disk? Because I now use Windows as operating system and I would like to try Ubuntu with the possibility to install programs. I do not have much experience with Ubuntu.
Thank you
https://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install
Solution 1:
In some USB creator applications like UNetbootin from the default Ubuntu repositories there is an option to allocate space used to preserve files across reboots. UNetbootin supports up to 4GB persistent storage, and its size is limited by the FAT32 file system. The default size of the persistent storage space is 0 MB, but it can be changed from the default size at the same time that you create the Ubuntu live USB. In the below screenshot the persistent storage space is 4GB on an 8GB USB flash drive with one FAT32 partition ( /dev/sdd1
).
UNetbootin in Ubuntu 16.04
The persistent storage space enables you to install software or save files on an Ubuntu live USB persistently across reboots. The persistence feature is not supported in Ubuntu 16.04-19.04, but persistent storage is supported again in 19.10 and later.
UNetbootin is compatible with Windows, Mac and Linux, however UNetbootin has been dropped from the official Ubuntu 18.04 repositories in Ubuntu 18.04 and later. When I tested the built-in Startup Disk Creator application as a UNetbootin replacement app with several non-*buntu live .iso images it worked in Ubuntu 18.04. mkusb supports the persistent file storage feature. It can be set up by following the instructions at: https://help.ubuntu.com/community/mkusb/persistent.
Solution 2:
When you boot from a live USB, only your pen drive will be mounted at first. So if you install any program, it won't be installed on your hard disk and corrupt your Windows install if that's what you are afraid of. But it is likely that your Ubuntu is not persistent, and that you will have to reinstall these programs the next time you boot. You can see how to make a persistent live USB here.
Solution 3:
Having the full Ubuntu experience on a Pendrive
You can get a full Ubuntu experience by installing Fully Ubuntu on a Pendrive. You can get large USB drives fairly inexpensive these days.
Just plug in a second Pendrive for your installation destination. The installation will not affect your Windows or your regular system drive unless you specifically choose your /dev/sda
for the boot device, which would still not touch Windows, it would just change the bootmanager to Grub.
While performing the full installation to a Pendrive, just pick the pendrive device for the installation and boot choice.
In this environment you would have the maximum drive space. It would just be a matter of choosing which drive to boot to when you choose between Windows and Ubuntu.
Note
Understandably that you don't want to touch your Windows drive. However, after using Ubuntu for a while, you could make it a more seamless to choose at between Windows and Ubuntu boot time by installing the Grub Boot Manager to your system drive. When you do that, you'll have the option of which one to boot to when without having to manually change drive when you want to change Operating system.
That would be a simple manner of just running the command sudo install-grub /dev/sda
.
As long as you don't specifically make any changes to /dev/sda
while you are working, no changes would ever happen to your normal computer's hard drive. If for some reason you wanted to browse your windows files and documents, it would be easy, just by clicking on your Windows drive (most likely named Windows) from your Ubuntu File browser.
Solution 4:
The installation app you see on the desktop is for installing Ubuntu to hard disk. If you are not careful you might end up replacing/corrupting your Windows OS.
For installing software the most popular ways are
- Synaptic Package Manager
- Ubuntu Software Centre
- Terminal
For detailed answers see How do I install applications in Ubuntu?
Note : If you simply use "Try Ubuntu" option any software you install in Ubuntu will be gone when you reboot. This I believe is what you are doing currently.
To keep the installed software across reboots you have two simple choices
- Make a persistent Ubuntu USB drive
- Install Ubuntu on your hard drive.