robocopy "C:\Program Files" "D:\Program Files" /E /COPYALL /DCOPY:T rmdir "C:\Program Files" /S /Q mklink /J "C:\Program Files" "D:\Program Files" Repeat for C:\Program Files (x86) if needed.
sudo mkdir -p /etc/dpkg/dpkg.cfg.d/ echo "path-include=/mnt/bigdrive/usr/*" | sudo tee /etc/dpkg/dpkg.cfg.d/path-redirect (Not recommended – breaks security updates)
# Copy existing sudo cp -R /usr/local/* /opt/homebrew/ # Update shell profile with new path echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/.zshrc 4.1 System-Wide Default ( /usr/local → custom prefix) By default, make install and package managers install to /usr/local . Change via --prefix : how to change default install location
setup.exe /DIR="D:\MyApps" /VERYSILENT /SUPPRESSMSGBOXES Use msiexec for MSI files:
sudo mkdir -p /mnt/bigdrive/usr sudo mount --bind /mnt/bigdrive/usr /usr # Make permanent via /etc/fstab echo "/mnt/bigdrive/usr /usr none bind 0 0" | sudo tee -a /etc/fstab For , use --installroot : how to change default install location
sudo dnf install --installroot=/mnt/bigdrive/fakeroot --releasever=38 package-name APT (advanced): Use dpkg override directory:
./configure --prefix=/mnt/bigdrive/usr/local make && sudo make install For , no global default change — use bind mounts: how to change default install location
sudo systemctl stop snapd sudo mv /var/lib/snapd /mnt/bigdrive/snapd sudo ln -s /mnt/bigdrive/snapd /var/lib/snapd sudo systemctl start snapd Set in ~/.bashrc or ~/.config/environment.d/ :