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/09/06 16:54] – [Base installation] Added a backup step jypeter | other:win10wsl [2022/09/08 09:55] – [Opening a terminal] jypeter | ||
---|---|---|---|
Line 206: | Line 206: | ||
* Reboot the computer and be patient | * Reboot the computer and be patient | ||
* This step will take some time (make sure you have 15-30 mn available). Windows will install and configure what it needs for running // | * This step will take some time (make sure you have 15-30 mn available). Windows will install and configure what it needs for running // | ||
- | * The final installation step will take place when you open your Windows session. A terminal opens, displaying the final installation of Ubuntu, and asking you for a username and password, and giving you access to a '' | + | * The final installation step will take place when you open your Windows session. A terminal opens, displaying the final installation of Ubuntu, and asking you for a username and password, and giving you access to a '' |
* < | * < | ||
Please create a default UNIX user account. The username does not need to match your Windows username. | Please create a default UNIX user account. The username does not need to match your Windows username. | ||
Line 233: | Line 233: | ||
stdu@sadira034: | stdu@sadira034: | ||
/ | / | ||
+ | |||
+ | * Note: after installing (even from the PowerShell command line), Ubuntu will appear as a regular installed application in the //Microsoft Store// and the list of applications | ||
+ | * {{ : | ||
+ | * {{ : | ||
* Get some basic information about your new '' | * Get some basic information about your new '' | ||
Line 413: | Line 417: | ||
[[https:// | [[https:// | ||
- | * Download and execute the latest [[https:// | + | * Download and execute the latest [[https:// |
* After installing, you will get several ways to open a terminal: | * After installing, you will get several ways to open a terminal: | ||
* Double-click on the '' | * Double-click on the '' | ||
Line 988: | Line 992: | ||
===== Advanced usage ===== | ===== Advanced usage ===== | ||
+ | ==== WSL security WARNING! ==== | ||
+ | <WRAP center round important 60%> | ||
+ | A regular Linux installation (on a Linux-only computer) is fairly secure,\\ but a Linux installation on WSL is not secure at all, **by design** | ||
+ | </ | ||
+ | |||
+ | WSL+Linux is designed to allow you to easily use Linux on Windows, including **very easily using the Linux root account without knowing any password** of the Linux installation! | ||
+ | |||
+ | < | ||
+ | wsl_default_user@your_machine:/ | ||
+ | wsl_default_user | ||
+ | |||
+ | PS C: | ||
+ | root@your_machine:/ | ||
+ | root</ | ||
+ | |||
+ | This is **a feature and not a security issue**, because your installation is protected by your Windows account security | ||
+ | |||
+ | You should be aware (and act accordingly) that: | ||
+ | * Somebody gaining access to your Windows account will also have full access to the Linux installation | ||
+ | * <wrap hi>Do not use an existing password for the WSL Linux account</ | ||
+ | * Storing data in the Linux part of your computer does not add any extra security | ||
+ | * Always **make sure that only you can access your Windows account** | ||
+ | * Your LSCE Windows laptop (not your desktop) is encrypted with [[https:// | ||
+ | |||
+ | * Somebody gaining access to a backup of your Linux installation will easily have access to the Linux installation itself | ||
+ | * You can store your Linux installation backup to [[https:// | ||
==== Creating a backup ==== | ==== Creating a backup ==== | ||
Line 1048: | Line 1078: | ||
==== Restoring or relocating a Linux installation ==== | ==== Restoring or relocating a Linux installation ==== | ||
- | When we have the tar file of a [[other: | + | When we have the '' |
Note: | Note: | ||
- | * This is currently the only way of moving (relocating) a Linux installation to another disk than the default '' | + | * This is currently the only way of **moving (//relocating//) a Linux installation** to another disk than the default '' |
- | * Importing will mostly put the '' | + | * //Importing// will mostly put the '' |
- | * You need [[other: | + | * You need [[other: |
- | * This is an indirect way of reclaiming the unused space of a Linux installation, i.e the size of the '' | + | * Creating a backup and restoring it is an indirect way of **reclaiming the unused space of a Linux installation |
Detailed [[https:// | Detailed [[https:// | ||
- | * We assume that we have an exported installation tar file available | + | * We assume that we have an exported installation |
* In this example, we use the compressed backup file created in [[other: | * In this example, we use the compressed backup file created in [[other: | ||
+ | * '' | ||
* Create the directory where the Linux installation (mostly its '' | * Create the directory where the Linux installation (mostly its '' | ||
- | * Hint: use an explicit directory path and name using the name of the distribution that will be restored\\ e.g. '' | + | * Hint: choose |
- | * Import the distribution, | + | * Import the distribution, |
* < | * < | ||
NAME STATE | NAME STATE | ||
Line 1075: | Line 1106: | ||
* After importing, there should be a new '' | * After importing, there should be a new '' | ||
* Start the imported '' | * Start the imported '' | ||
- | * Directly from the Windows Terminal pull-down menu | + | * Select '' |
- | * Or from a PowerShell, using '' | + | * Or specify '' |
- | * WARNING: even if the distribution we imported had an existing default '' | + | * WARNING: even if the imported |
- | * It is possible to explicitly specify the requested user each time we start a terminal, but it will be more convenient to specify a default user\\ wsl --distribution Ubuntu_custom --user stdu | + | * It is possible to explicitly specify the requested user each time we start a terminal, but it will be more convenient to specify a new default user\\ |
- | * Specify | + | * You can easily open a '' |
+ | * Select | ||
* < | * < | ||
cat: / | cat: / | ||
Line 1090: | Line 1122: | ||
* Restart the Linux installation to take the new settings into account | * Restart the Linux installation to take the new settings into account | ||
* '' | * '' | ||
- | * If you need the '' | + | * If you need the '' |
* < | * < | ||
stdu | stdu | ||
Line 1097: | Line 1129: | ||
root@sadira034: | root@sadira034: | ||
root</ | root</ | ||
+ | * If the // | ||
- | FIXME Read [[https:// | + | Questions |
+ | * Is it possible | ||
+ | ==== Uninstalling | ||
- | FIXME Check if [[https://wslhub.com/|WSL Manager]] is maintained and can be useful | + | Before uninstalling |
- | + | ||
- | This assumes that you have followed the steps above to create a full backup of your Linux distribution in a '' | + | |
- | * '' | + | |
- | * Note: found a page mentioning that you should be in a terminal with admin rights when using '' | + | |
- | * Can we use the same ''< | + | |
- | * If we use a new distribution name, it will probably not appear anymore in the Microsoft Store and will not be updated. Is this a problem? | + | |
- | * It seems we can use ''< | + | |
- | * Can we install out of the current user's Windows folder? | + | |
- | * Can we install out of '' | + | |
- | * Can we restore (//clone//) a backed up Linux distribution on another Windows 10 computer for another user? | + | |
- | * if the default user (and its password) has to be changed, you probably have to follow the steps to [[https:// | + | |
- | + | ||
- | + | ||
- | ==== 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 ''/ | + | |
=== Removing a specific Linux installation === | === Removing a specific Linux installation === | ||
Line 1143: | Line 1162: | ||
* Ubuntu | * Ubuntu | ||
+ | |||
+ | === Removing the main Linux installation === | ||
+ | |||
+ | If you remove the main installation (on '' | ||
+ | * Another // | ||
+ | * < | ||
+ | NAME | ||
+ | Ubuntu_custom | ||
+ | * Ubuntu | ||
+ | |||
+ | PS C: | ||
+ | Désinscription... | ||
+ | |||
+ | PS C: | ||
+ | NAME | ||
+ | * Ubuntu_custom | ||
+ | |||
+ | * The initial installation directory will still be present on '' | ||
+ | * '' | ||
+ | * ...with a very low disk usage (the big '' | ||
+ | |||
+ | * '' | ||
+ | * If you end up with an installation error message and a new //orphan// '' | ||
+ | |||
+ | * '' | ||
=== Removing WSL === | === Removing WSL === |
other/win10wsl.txt · Last modified: 2023/12/06 14:24 by jypeter