Skip to content

Default start directory in Ubuntu on WSL #881

@RabeaMue

Description

@RabeaMue

refering to new installation guide for unix shell: https://github.com/carpentries/workshop-template/blob/gh-pages/_includes/install_instructions/shell.html

When using Ubuntu via WSL on Windows, the shell by default starts in the Linux home directory (/home/<username>), not in the Windows home directory. This can cause confusion e.g. for a Library Carpentry with the shell-lesson folder, especially when participants are asked to place the shell-lesson folder on their Windows Desktop.

Problem

If the folder is on the Windows Desktop, the path to access it is:

/mnt/c/Users/<username>/Desktop/shell-lesson

Instead of the simpler command from the lesson:

cd Desktop/shell-lesson

This mismatch may confuse beginners and lead to errors.

Possible solutions

Pre-workshop setup

Ask learners to add the following line at the end of their ~/.bashrc so that their shell starts in the Windows home directory:

cd /mnt/c/Users/<username>

I did it like this in my last workshop. In that case cd won't bring them back to the Windows Home directory, but therefore I did not change the Home path permanently and I did not run into errors later when installing conda-forge through WSL or setting an SSH key pair for the Git Lesson.

Adapt the lesson

Update the Shell lesson instructions to explain that on WSL, learners might need to either

use the full Windows path under /mnt/c/..., or

move the shell-lesson folder into their Ubuntu home (/home/) via the terminal before starting the exercises.

This clarification would prevent confusion and make the experience smoother for WSL users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions