Skip to content

Commit

Permalink
Merge branch 'main' into live
Browse files Browse the repository at this point in the history
  • Loading branch information
craigloewen-msft committed Feb 3, 2023
2 parents 5c87c96 + 69e89ea commit dc6c7c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions WSL/basic-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ For example:
wsl --shutdown
```

Immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine. This command may be necessary in instances that require you to restart the WSL 2 virtual machine environment, such as [changing memory usage limits](./vhd-size.md) or making a change to your [.wslconfig file](./manage.md#).
Immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine. This command may be necessary in instances that require you to restart the WSL 2 virtual machine environment, such as [changing memory usage limits](/windows/wsl/disk-space) or making a change to your [.wslconfig file](./manage.md#).

## Terminate

Expand Down Expand Up @@ -237,4 +237,4 @@ bash [Options]
lxrun /[Argument]
```

These commands were the original wsl syntax for configuring Linux distributions installed with WSL, but have been replaced with the `wsl` or `wsl.exe` command syntax.
These commands were the original wsl syntax for configuring Linux distributions installed with WSL, but have been replaced with the `wsl` or `wsl.exe` command syntax.
11 changes: 10 additions & 1 deletion WSL/faq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,16 @@ sections:
* The Linux kernel used by WSL is updated automatically.
* GPU access in WSL happens through a `/dev/dxg` device, which routes GPU calls out to the Windows GPU. This setup is different than a traditional Linux set up.
* There are other smaller differences compared to bare metal Linux and more differences are expected to arise in the future as the inner loop development workflow is prioritized.
- question: |
How can I transfer my WSL files from one machine to another?
answer: |
There are a few ways you can accomplish this task:
* The easiest way is to use the `wsl --export --vhd` command to export your WSL distribution to a VHD file. You can then copy this file to another machine, and import it using `wsl --import --vhd`. Please see the [commands doc](./basic-commands.md) for more information.
* The implementation above requires a lot of disk space. If you don't have a lot of disk space you can use Linux techniques to move your files over:
* Use `tar -czf <tarballName> <directory>` to create a tarball of your files. You can then copy these specific files over to your new machine and run `tar -xzf <tarballName>` to extract them.
* You can also export a list of installed packages via `apt` with a command like so: `dpkg --get-selections | grep -v deinstall | awk '{print $1}' > package_list.txt` and then reinstall those same packages on another machine with a command like `sudo apt install -y $(cat package_list.txt)` after transferring the file over.
- name: WSL 2
questions:
Expand Down

0 comments on commit dc6c7c6

Please sign in to comment.