← All commands
Topic hub File Management
Windows Linux File Management Expanded guide File System

Windows subst equivalent in Linux

Makes an existing directory tree accessible at a second mount point.

Windows subst
→
Linux equivalents
Debian/Ubuntu same command
sudo mount --bind /source /mountpoint
Fedora same command
sudo mount --bind /source /mountpoint
Arch same command
sudo mount --bind /source /mountpoint

Overview

What this command does

On Windows, "subst" is used to map a directory to another path. On Linux, the closest practical mapping shown here is "sudo mount --bind /source /mountpoint". Makes an existing directory tree accessible at a second mount point. This reference is grouped under File Management → File System.

Migration tip: Windows <code>subst</code> creates a drive-letter alias. Linux bind mounts expose a directory at another directory path instead.

Windows → Linux context

What changes when you use this on Linux?

Equivalent task, different tool

Windows subst maps to sudo mount --bind /source /mountpoint for this task. Treat this as a workflow mapping rather than a character-for-character syntax translation.

Portable across the compared distros

The Debian/Ubuntu, Fedora and Arch rows use the same command in this mapping. Package availability or defaults can still vary, so check the installed tool version when an option behaves differently.

Elevated privilege appears in this workflow

At least one example uses sudo. Confirm the target path, device, service or package before running the elevated form; do not add sudo simply to bypass an unexplained permission error.

Command-specific caution

Bind mounts are not persistent after reboot unless added to /etc/fstab or recreated by a service.

Practical tasks

Common use cases

Map a directory to another path

Makes an existing directory tree accessible at a second mount point.

sudo mkdir -p /mnt/project

Create the destination mount point

sudo mount --bind /home/user/project /mnt/project

Create the bind mount

sudo umount /mnt/project

Remove the bind mount

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

sudo mkdir -p /mnt/project
sudo mount --bind /home/user/project /mnt/project
sudo umount /mnt/project

Walkthrough

Examples with explanations

sudo mkdir -p /mnt/project # create a mount point
sudo mount --bind /home/user/project /mnt/project # map a directory to the mount point
sudo umount /mnt/project # remove the mapping

Reference

Common options and variations

Command or optionUse
sudo mkdir -p /mnt/projectCreate the destination mount point
sudo mount --bind /home/user/project /mnt/projectCreate the bind mount
sudo umount /mnt/projectRemove the bind mount

Distro differences

Debian/Ubuntu vs Fedora vs Arch

Debian/Ubuntu, Fedora and Arch all use "sudo mount --bind /source /mountpoint" for this mapping. The command syntax shown here is portable across the three rows, although installed versions and system defaults can still vary.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command sudo mount --bind /source /mountpoint Same command on this distribution.
Fedora same command sudo mount --bind /source /mountpoint Same command on this distribution.
Arch same command sudo mount --bind /source /mountpoint Same command on this distribution.

Important

What to watch out for

Bind mounts are not persistent after reboot unless added to /etc/fstab or recreated by a service.

Keep learning

Related File Management commands