Score:3

Where does Ubuntu install new programs?

ng flag

I'm planning on having the OS both in a partitioned SSD and HDD to take advantage of an M.2 drive while having the space in the normal HDD. But where's does the programs get installed by default?

As far as I know, I can use the / partition in the SSD for faster boot times and the /home one for everything else. But I also would like that some programs (browser and Netbeans por example) get the benefit of the SSD and load quicker.

In here its mentioned as another option that both / and /home can be in the SSD and everything else in the HDD, but idk if this is what i want.

pLumo avatar
in flag
If `/` is on your SSD and `/home` on your HDD, you're all set. Programs installed by app, will be on the SSD. However, you cannot easy tell where programs get installed. Linux works diffferently. Programs are usually split between Libraries, binaries and configuration, etc. See [here](https://askubuntu.com/questions/138547/how-to-understand-the-ubuntu-file-system-layout)
N0rbert avatar
zw flag
Does this answer your question? [How do I install applications in Ubuntu?](https://askubuntu.com/questions/307280/how-do-i-install-applications-in-ubuntu) Most of them are installed into /, some to /snap, some to your home folder.
guiverc avatar
cn flag
The packager decides where the packages gets placed; though even the packager has limitations & rules he/she must comply with; some package formats themselves have limitations or set locations. Your control is location of directories as specific package types usually go to very predictable locations (you've given no specifics; as different type of packages can be used by different apps; one package (eg. firefox) may be available in various formats (deb, snap, flatpak etc) but you've not said what you're thinking of)
Score:3
cn flag

Programs generally get installed to the root partition, unless you are doing something really fancy. As a beginner (only beginners ask this common question), you won't able to change the location that applications install to. So don't scrimp on your root (/) partition size.

Opinion: If your root (/) and /home are on the same disk, then there seems no point to have separate partitions for them. You can if you wish, and it was quite popular to do so a decade ago, but you are unlikely to see much benefit nowadays.

Advice: Many start out thinking along the lines you describe. After a few months, with real usage experience, they discover that they want (or need) to re-partition and sometimes even re-install. Be prepared for that: Document your customizations and installs so you can reproduce them on a fresh system. Have adequate backup capacity available. Have adequate unallocated space available. And hang on to your LiveUSB (or write down the link to re-create one).

pk flag
The reason people might want to have /home on a separate disk is theoretically to make it a bit easier to install a different distro.
Score:0
my flag

I know it is something people are rather lax about now, but there may be some good sense, long-term, in placing certain things on different partitions. The purpose is to exercise some control over space use; even on a laptop there will be programs that keep filling up the disk until you run out of space and have find where the problem is - that is a lot easier if you don't keep everything in a single filesystem. Also, you don't want to find yourself in a situation where almost everything is impossible because there is no space left on the disk.

Another thing that can be helpful, certainly on a server, is to use either logical volumes (see: lvm) or a filesystem like zfs. This is much more flexible than partitions - not only can you change the size of a logical volume without hassle, but you can add more harddisks to your volume groups when you need more space.

Also, you don't need to have partitions at all, if you use volume groups or just have one filesystem on a disk, just use mkfs directly on the device.

I usually put the directories that tend to grow a lot, in separate filesystems, certainly /tmp and /var (most logs end up in /var/log and can become very large), but also split off /var/lib/mysql from /var if you use mysql.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.