-
Notifications
You must be signed in to change notification settings - Fork 81
Description
As the Ubuntu on WSL documentation refers to both terminal environments on Ubuntu (Bash) and Windows (PowerShell), we use terminal prompts ($
, >
) to distinguish between them.
In addition, we sometimes use paths within the prompts (~/a/path/to/some/dir
) to signal where commands are being run or where files are being moved between.
We accept a degree of complexity here because it relates to the user experience of switching contexts between Ubuntu and Windows when using WSL.
However, we should not introduce additional complexity where it is not helpful. A problem that we have is inconsistency in how we refer to user and host names on a machine.
Consider these examples:
- username@pc:/mnt/c/Users/username$ (https://documentation.ubuntu.com/wsl/latest/howto/install-ubuntu-wsl2/)
- PS C:\Users\me> mkdir backup (https://documentation.ubuntu.com/wsl/latest/howto/backup-and-restore/)
- $ mv /mnt/c/Users/<yourusername>/Downloads/ubuntu-24.04.2-wsl-amd64.wsl ./ubuntu-24.04.2-wsl-amd64.tar (https://documentation.ubuntu.com/wsl/latest/howto/custom-ubuntu-distro/)
- C:\Users\<YOUR_WINDOWS_USER_NAME>\landscape_server.pem (https://documentation.ubuntu.com/wsl/latest/howto/set-up-landscape-client/
In these examples alone, we have username
, me
, <yourusername>
and <YOUR_WINDOWS_USER_NAME>
being used for the username. We should really only have one way of doing this.
If you are assigned this issue, you should seek to adopt a simple and consistent approach to prompt paths in the documentation, preferably with a single placeholder <placeholder>
names used across the documentation for hostnames and usernames.
Note
You need to focus specifically on the username and hostname in the prompts.
Subtleties about the choice of prompts for PowerShell and Bash are outside the scope of this issue.
Tip
There may be cases where your preferred choice is not appropriate.
For example, the use of the placeholder <username>
is common and should probably be used here.
However, in the tutorial we explain what a PowerShell prompt looks like with the example PS C:\Users\username>
.
It makes less sense to substitute the placeholder here because we are not asking the user to run any command, so they won't be replaceing "username".
In addition, the result PS C:\Users\<username>>
could be confusing because of the multiple angle brackets.
Please let me know if you are interested.
You will make your contribution directly to the Ubuntu Pro for WSL repo.
The Canonical CLA needs to be signed for your submission to be finalised.