Skip to content

Instantly share code, notes, and snippets.

Marc Esher marcesher

Block or report user

Report or block marcesher

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sgtoj
sgtoj / persistent_c_mount_wsl.sh
Last active Aug 27, 2019
Ubuntu for Windows: Mounting C: Drive to WSL's Root
View persistent_c_mount_wsl.sh
# allow `mount` cmd without password
echo "$USER ALL=NOPASSWD: /bin/mount" | (sudo su -c 'EDITOR="tee -a" visudo')
# add the mount directive to `fstab`
sudo mkdir -p /c
sudo sh -c "echo '/mnt/c /c none bind' >> /etc/fstab"
# update to `.bashrc` to auto mount at login
echo "sudo mount -a" >> ~/.bashrc
# now reload it
source ~/.bashrc
You can’t perform that action at this time.