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/31 11:12] – WSL 1 vs 2, and note about which terminals to use jypeter | other:win10wsl [2022/08/31 13:47] – [Creating a backup of a Linux installation] Improved jypeter | ||
---|---|---|---|
Line 551: | Line 551: | ||
en_US.UTF8 | en_US.UTF8 | ||
</ | </ | ||
+ | |||
+ | |||
==== Package management ==== | ==== Package management ==== | ||
Line 559: | Line 561: | ||
* Install the **synaptic** package manager: '' | * Install the **synaptic** package manager: '' | ||
* [[https:// | * [[https:// | ||
+ | |||
=== Useful commands === | === Useful commands === | ||
Line 565: | Line 568: | ||
* '' | * '' | ||
* '' | * '' | ||
+ | |||
=== Example === | === Example === | ||
Line 734: | Line 738: | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | |||
===== Advanced configuration ===== | ===== Advanced configuration ===== | ||
Line 958: | Line 964: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | |||
==== Rebooting WSL ==== | ==== Rebooting WSL ==== | ||
Line 998: | 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 1062: | Line 1027: | ||
===== Advanced usage ===== | ===== Advanced usage ===== | ||
- | ==== Creating a backup of a Linux installation ==== | + | |
+ | ==== Creating a backup | ||
+ | |||
+ | === Backup | ||
+ | |||
+ | 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 | ||
other/win10wsl.txt · Last modified: 2023/12/06 14:24 by jypeter