other:win10wsl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
other:win10wsl [2022/08/30 16:47] – Moved Uninstalling to a new Advanced usage section jypeter | other:win10wsl [2022/08/31 13:47] – [Creating a backup of a Linux installation] Improved jypeter | ||
---|---|---|---|
Line 3: | Line 3: | ||
[[other: | [[other: | ||
- | <note warning> | + | <WRAP center round important 60%> |
* What is described on this page was tested with [[https:// | * What is described on this page was tested with [[https:// | ||
- | * You can also check JYP's [[other: | + | * You can also check JYP's [[other: |
+ | * ...but even **if you need WSL 1, you should use this page for installing WSL, and then switch to WSL 1** with [[https:// | ||
* The user can choose to install Linux using **WSL 1 or WSL 2** | * The user can choose to install Linux using **WSL 1 or WSL 2** | ||
* **WSL 2 should be your default choice** | * **WSL 2 should be your default choice** | ||
* If you have doubts, check the [[https:// | * If you have doubts, check the [[https:// | ||
- | </note> | + | </WRAP> |
+ | |||
+ | |||
+ | <WRAP center round tip 60%> | ||
+ | The commands on this page have to be typed: | ||
+ | * either in **Windows PowerShell terminals** | ||
+ | * or in **bash terminals running in WSL** | ||
+ | It should be clear enough which type of terminal you have to use | ||
+ | </ | ||
Line 541: | Line 551: | ||
en_US.UTF8 | en_US.UTF8 | ||
</ | </ | ||
+ | |||
+ | |||
==== Package management ==== | ==== Package management ==== | ||
Line 549: | Line 561: | ||
* Install the **synaptic** package manager: '' | * Install the **synaptic** package manager: '' | ||
* [[https:// | * [[https:// | ||
+ | |||
=== Useful commands === | === Useful commands === | ||
Line 555: | Line 568: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
=== Example === | === Example === | ||
Line 724: | Line 738: | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | |||
===== Advanced configuration ===== | ===== Advanced configuration ===== | ||
Line 948: | Line 964: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | |||
==== Rebooting WSL ==== | ==== Rebooting WSL ==== | ||
Line 988: | Line 1005: | ||
* <wrap hi> | * <wrap hi> | ||
- | * <wrap hi>The **full** Linux/ | ||
- | * Open a **Windows terminal** (preferably a // | ||
- | * Determine the name of the current Linux installation used in WSL (and see if it is running, and using //WSL 1// or //WSL 2//) | ||
- | * < | ||
- | Distributions du sous-système Windows pour Linux : | ||
- | Ubuntu (par défaut) | ||
- | > wsl --list --verbose | ||
- | NAME STATE | ||
- | * Ubuntu | ||
- | * [[other: | ||
- | * < | ||
- | NAME STATE | ||
- | * Ubuntu | ||
- | |||
- | > wsl --shutdown | ||
- | |||
- | > wsl -l -v | ||
- | NAME STATE | ||
- | * Ubuntu | ||
- | * Export the current Linux to a //tar// file: | ||
- | * FIXME '' | ||
- | * 1.4 Gb | ||
- | * < | ||
- | * You can optionally open a new terminal (this will start again WSL+Ubuntu) to get some information about the created file (size and number of saved files/ | ||
- | * < | ||
- | |||
- | $ ls -ltrh *ubuntu*tar* | ||
- | 976M Jan 21 2020 < | ||
- | 2.8G Aug 22 2020 < | ||
- | 3.4G Feb 24 14:06 < | ||
- | |||
- | # Determine the number of files/ | ||
- | $ tar tvf < | ||
- | 112711 | ||
- | |||
- | $ gzip *ubuntu*.tar | ||
- | |||
- | $ ls -ltrh *ubuntu*tar* | ||
- | 976M Jan 21 2020 < | ||
- | 1.2G Aug 22 2020 < | ||
- | 1.8G Feb 24 14:06 < | ||
- | </ | ||
==== Restoring a WSL backup ==== | ==== Restoring a WSL backup ==== | ||
Line 1052: | Line 1027: | ||
===== Advanced usage ===== | ===== Advanced usage ===== | ||
+ | |||
+ | ==== Creating a backup ==== | ||
+ | |||
+ | === Backup of a Full Linux installation === | ||
+ | |||
+ | You can use '' | ||
+ | * used later for // | ||
+ | * used for // | ||
+ | |||
+ | Detailed steps: | ||
+ | * Determine the name of the current Linux installation used in WSL (and see if it is running, and using //WSL 1// or //WSL 2//) | ||
+ | * < | ||
+ | NAME STATE | ||
+ | * Ubuntu | ||
+ | * [[other: | ||
+ | * < | ||
+ | |||
+ | > wsl -l -v | ||
+ | NAME STATE | ||
+ | * Ubuntu | ||
+ | * Export the specified Linux installation to a //tar// file: | ||
+ | * You should export to a directory or external disk where you have //enough// space\\ e.g. The tar file for a [[other: | ||
+ | * You should use a detailed enough file name for the tar file\\ e.g. WSL_< | ||
+ | * Example: '' | ||
+ | |||
+ | * If you are not going to use the backup tar file right away, you can optionally compress it in order to save some space | ||
+ | * < | ||
+ | |||
+ | === Other types of backup === | ||
+ | |||
+ | |||
+ | ==== Restoring or relocating a Linux installation ==== | ||
+ | |||
+ | When we have a backup in a tar file, we can restore it to the default location (Check ?? FIXME), or specify where we want to restore it. This is a way of moving (relocating) an installation to another disk or partition than the default location '' | ||
==== Uninstalling WSL ==== | ==== Uninstalling WSL ==== | ||
Before starting, you may want to make a backup of whatever you had in your Ubuntu home directory, and all the files and settings that are not in the ''/ | Before starting, you may want to make a backup of whatever you had in your Ubuntu home directory, and all the files and settings that are not in the ''/ | ||
- | === Removing a Linux installation === | + | === Removing a specific |
- | This process is called unregistering | + | This process is called |
You just need to get the list of the currently installed Linux distributions, | You just need to get the list of the currently installed Linux distributions, | ||
Line 1084: | Line 1093: | ||
=== Removing WSL === | === Removing WSL === | ||
- | FIXME | + | '' |
+ | |||
+ | Anyway, when all existing Linux distributions are uninstalled, | ||
other/win10wsl.txt · Last modified: 2023/12/06 14:24 by jypeter