User Tools

Site Tools


other:win10wsl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
other:win10wsl [2022/08/31 16:58] – [Restoring or relocating a Linux installation] Improved jypeterother:win10wsl [2022/08/31 17:57] – [Restoring or relocating a Linux installation] Improved jypeter
Line 1075: Line 1075:
     * Or from a PowerShell, using ''wsl --distribution Ubuntu_custom''     * Or from a PowerShell, using ''wsl --distribution Ubuntu_custom''
     * WARNING: even if the distribution we imported had an existing default ''stdu'' user, the //new// default user will be ''root'' !     * WARNING: even if the distribution we imported had an existing default ''stdu'' user, the //new// default user will be ''root'' !
 +      * 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
 +  * Specify a default user (note: [[https://docs.microsoft.com/en-us/windows/wsl/use-custom-distro#add-wsl-specific-components-like-a-default-user|Add WSL a default user]] also shows how to //create a new user//). We just have to use the root account to add a default user (user ''stdu'' here) to the [[https://docs.microsoft.com/en-us/windows/wsl/wsl-config#user-settings|/etc/wsl.conf]] file
 +    * <code># cat /etc/wsl.conf
 +cat: /etc/wsl.conf: No such file or directory
 +
 +# echo -e "[user]\ndefault=stdu" >> /etc/wsl.conf
 +
 +# cat /etc/wsl.conf
 +[user]
 +default=stdu</code>
 +    * Restart the Linux installation to take the new settings into account
 +      * ''%%wsl  --terminate Ubuntu_custom%%''
 +    * If you need the ''root'' account later, you will need to use the ''sudo'' command from the new default account
 +      * <code>$ whoami
 +stdu
 +stdu@sadira034:~$ sudo su -
 +[sudo] password for stdu:
 +root@sadira034:~# whoami
 +root</code>
  
 FIXME Read [[https://www.howtogeek.com/426562/how-to-export-and-import-your-linux-systems-on-windows-10/|How to Export and Import Your Linux Systems on Windows 10]] and [[https://winaero.com/blog/export-import-wsl-linux-distro-windows-10/|Export and Import WSL Linux Distro in Windows 10]] and similar threads FIXME Read [[https://www.howtogeek.com/426562/how-to-export-and-import-your-linux-systems-on-windows-10/|How to Export and Import Your Linux Systems on Windows 10]] and [[https://winaero.com/blog/export-import-wsl-linux-distro-windows-10/|Export and Import WSL Linux Distro in Windows 10]] and similar threads
other/win10wsl.txt · Last modified: 2023/12/06 14:24 by jypeter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki