wsl_linux_ubuntu_cheatsheet
This is an old revision of the document!
Table of Contents
WSL / Linux / Ubuntu Cheatsheet
Commands
Windows: wsl –install | Install WSL. |
Windows: wsl –list | List installed Linux flavours. |
Windows: wsl –install -d ubuntu | Install Ubuntu. |
Windows: wsl -s ubuntu | Make Ubuntu the default. |
WSL: sudo apt-get update && sudo apt-get install -y dotnet-sdk-7.0 | Install Dotnet on WSL. |
WSL: ll or ls -alF | List files properly. |
Accessing drives
- In WSL, accessing Windows drive:
/mnt/c/Dev
- In Windows, accessing WSL:
\\wsl.localhost\Ubuntu\home
Run commands on Bash start up
Edit your .bashrc
file, it will be \\wsl.localhost\Ubuntu\home\<you>\.bashrc
, append whatever you want to the bottom.
Mount a Windows Drive
- Get drive info:
sudo fdisk -l
, look for something like/dev/sda4
. - Make a directory to mount it to:
sudu mkdir /mnt/windows
. - Mount it:
sudo mount -t ntfs-3g /dev/sda4 /mnt/windows
. Add a-r
for read only.
wsl_linux_ubuntu_cheatsheet.1757222865.txt.gz · Last modified: 2025/09/07 05:27 by stephen