Skip to content

Instantly share code, notes, and snippets.

@ErykDarnowski
Last active June 15, 2023 07:17
Show Gist options
  • Save ErykDarnowski/3061b693273f3973253db556d7b2af8c to your computer and use it in GitHub Desktop.
Save ErykDarnowski/3061b693273f3973253db556d7b2af8c to your computer and use it in GitHub Desktop.
How to easily, quickly and temporarily (without playing around with `mount` and `fstab`) mount a filesystem on Linux

How to easily, quickly and temporarily (without playing around with mount and fstab) mount a filesystem on Linux

  1. Install sshfs

    apt (Ubuntu / Debian / Mint)
    sudo apt update -y
    sudo apt upgrade -y
    
    sudo apt install sshfs -y
    dnf (Fedora / CentOS / Red Hat Enterprise Linux)
    sudo dnf check-update
    sudo dnf upgrade -y
    
    sudo dnf install sshfs -y
    pacman (Arch)
    yes | sudo pacman -Syu sshfs
  2. Create a mount point

sudo mkdir /mnt/<folder_name>/
  1. Mount the remote filesystem
sudo sshfs <remote_user>@<host>:<path> /mnt/<folder_name>/

* To unmount, simply run: sudo umount /mnt<folder_name>/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment