You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在SSD安装Ubuntu并将HDD用作Home分区时,如何将deb包与Flatpak软件安装至SSD的问题咨询

在SSD安装Ubuntu并将HDD用作Home分区时,如何将deb包与Flatpak软件安装至SSD的问题咨询

Hey Emir, let's work through this step by step—since DEB packages and Flatpaks handle storage differently, we'll tackle them separately:

DEB Packages

First off, a quick clarification: by default, DEB packages are installed directly to your system's root partition (/), which is your SSD (since that's where you installed Ubuntu). What you're probably seeing is user-specific data or configurations (like browser profiles, app settings) ending up in your /home directory (on the HDD). If you want those bulk data files on the SSD instead, here's how to fix it:

  • For apps that let you pick an install location during setup: Look for a "custom path" option in their installation wizard, and point it to a folder you create on your SSD (like /opt/my-apps or a dedicated /ssd-app-data directory).
  • For apps that don't offer this choice: You can move their data folders from your /home to the SSD, then create a symbolic link so the app still finds it at the original path. For example, with Firefox:
    1. Create a folder on your SSD (replace your-user with your actual username):
      sudo mkdir /ssd-data/firefox
      sudo chown your-user:your-user /ssd-data/firefox
      
    2. Move your existing Firefox profile data:
      mv ~/.mozilla/firefox /ssd-data/
      
    3. Link it back to the original location:
      ln -s /ssd-data/firefox ~/.mozilla/firefox
      
    This trick works for most apps—just find their data folder in ~/.config/ or ~/.local/share/ and repeat the process.

Flatpaks

Flatpaks have two main storage areas: system-wide app files live in /var/lib/flatpak/ (which is already on your SSD, since /var is part of the root partition) and user-specific data (like app settings, caches) goes to ~/.var/app/ (your HDD, since /home is there). If you want that user-specific data on the SSD instead, here's what to do:

  1. Create a dedicated folder on your SSD for Flatpak user data:
    sudo mkdir /ssd-flatpak-user
    sudo chown your-user:your-user /ssd-flatpak-user
    
  2. Move your existing Flatpak user data over:
    mv ~/.var/app /ssd-flatpak-user/
    
  3. Create a symbolic link so Flatpak still looks in the right place:
    ln -s /ssd-flatpak-user/app ~/.var/app
    

Alternatively, if you want to set this up for new Flatpaks without moving existing data, add this line to your ~/.bashrc or ~/.profile file to set an environment variable:

export FLATPAK_USER_DIR="/ssd-flatpak-user"

Log out and back in, and any new Flatpaks you install will store their user data on the SSD.

One quick check to confirm: run df -h / in the terminal to make sure your root partition (/) is indeed mounted on your SSD. The output will show the device path (something like /dev/nvme0n1p2 for an SSD) next to the / mount point.

备注:内容来源于stack exchange,提问作者Emir

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.20 11:04:30