8GB硬盘安装Ubuntu时,根分区、/usr及/usr/local分区大小设置咨询
Partitioning 8GB Drive for Ubuntu: /, /usr, and /usr/local Sizing
Hey there! I’ve tackled a few tight Ubuntu installs on small drives before, so let’s break down the best way to split your 8GB space between /, /usr, and /usr/local—keep in mind, 8GB is well below the official minimum (25GB for a full desktop), so we’ll need to prioritize essentials to make this work smoothly.
Recommended Partition Sizes
Here’s a balanced split that supports a minimal, functional Ubuntu setup:
- Root (
/): 2.5–3GB- This holds system configs, boot files, temporary data, and your user home folders (we can’t spare space for a separate
/homepartition here). 2.5GB is the absolute bare minimum to handle updates and basic system logs; 3GB gives a small buffer to avoid unexpected "disk full" errors.
- This holds system configs, boot files, temporary data, and your user home folders (we can’t spare space for a separate
/usr: 4–4.5GB/usrhouses most of Ubuntu’s core software, libraries, and pre-built binaries. A default minimal install takes ~3–3.5GB here, so 4–4.5GB leaves room for a few extra tools (like a lightweight browser or code editor) and minor system updates without hitting capacity limits.
/usr/local: 500MB–1GB- This partition is for software you compile from source or install manually (outside the
aptpackage manager). If you only plan to add a couple of custom tools, 500MB is sufficient. If you do frequent source builds, bump it to 1GB—but keep an eye on the total space used across all partitions.
- This partition is for software you compile from source or install manually (outside the
Pro Tips to Make This Work
- Skip a dedicated swap partition (if you have ≥4GB RAM): Swap eats up precious space. Instead, create a flexible swap file after installation with these commands:
This lets you adjust the swap size later if needed, without locking up partition space upfront.sudo fallocate -l 1G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile - Opt for the "Minimal Installation": When setting up Ubuntu, choose the minimal option—it skips bloat like LibreOffice, pre-installed games, and media players, saving 2–3GB right off the bat.
- Clean up regularly: Run
sudo apt autoremove && sudo apt cleanafter updates to delete old package files. You can also enable automatic cleanup in the Software & Updates settings to handle this automatically. - Stick to lightweight apps: Use tools like
midori(lightweight browser),mousepad(text editor), andpcmanfm(file manager) to avoid filling up space with heavy, resource-hungry software.
If you end up running low on space later, you can resize partitions safely using a Ubuntu live USB—just make sure to back up your data first!
内容的提问来源于stack exchange,提问作者Scorbunny32D
相关产品推荐
相关产品推荐

