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 revision Previous revision
Next revision Both sides next revision
other:win10wsl [2022/10/27 15:52]
jypeter [Upgrading ubuntu]
other:win10wsl [2022/10/28 14:04]
jypeter [Creating a backup]
Line 1098: Line 1098:
   * Determine the name of the current Linux installation(s) used in WSL   * Determine the name of the current Linux installation(s) used in WSL
     * <​code>>​ wsl --list --verbose     * <​code>>​ wsl --list --verbose
-  NAME      STATE           ​VERSION +  NAME             ​STATE           ​VERSION 
-Ubuntu ​   ​Running ​        ​2</​code>​+Ubuntu_custom ​   ​Running ​        ​2</​code>​
   * [[other:​win10wsl#​rebooting_wsl|Stop all running installations]]   * [[other:​win10wsl#​rebooting_wsl|Stop all running installations]]
       * <​code>>​ wsl --shutdown       * <​code>>​ wsl --shutdown
  
 > wsl -l -v > wsl -l -v
-  NAME      STATE           ​VERSION +  NAME             ​STATE           ​VERSION 
-Ubuntu ​   ​Stopped ​        ​2</​code>​+Ubuntu_custom ​   ​Stopped ​        ​2</​code>​
       * ... or stop just the specific installation that you want to save:\\ ''​%%>​ wsl --terminate Ubuntu_custom%%''​       * ... or stop just the specific installation that you want to save:\\ ''​%%>​ wsl --terminate Ubuntu_custom%%''​
  
Line 1111: Line 1111:
     * You should export to a directory or external disk where you have //enough// space\\ e.g. The tar file for a [[other:​win10wsl#​base_installation|newly installed and updated]] //Ubuntu 20.04.5 LTS// is ~1.4 Gb     * You should export to a directory or external disk where you have //enough// space\\ e.g. The tar file for a [[other:​win10wsl#​base_installation|newly installed and updated]] //Ubuntu 20.04.5 LTS// is ~1.4 Gb
     * You should use a detailed enough file name for the tar file\\ e.g. WSL_<​Linux_Distribution>​_<​Distribution_Version>​_<​User>​_<​Date>​.tar     * You should use a detailed enough file name for the tar file\\ e.g. WSL_<​Linux_Distribution>​_<​Distribution_Version>​_<​User>​_<​Date>​.tar
-    * Example: ''​%%wsl --export Ubuntu C:​\Scratch\your_login\WSL\WSL_Ubuntu_20.04.5_LTS_stdu_22-08-29.tar%%''​+    * Example: ''​%%wsl --export Ubuntu C:​\Scratch\your_login\WSL\WSL_Ubuntu_20.04.5_LTS_stdu_22-10-27.tar%%''​
  
     * You can (probably) save a lot of space by compressing the backup     * You can (probably) save a lot of space by compressing the backup
-      * It is not documented (yet), but the [[https://​github.com/​MicrosoftDocs/​WSL/​issues/​1607|wsl --import]] command can directly import ''​tar.gz''​ files! +      * It is not documented (yet), but the [[https://​github.com/​MicrosoftDocs/​WSL/​issues/​1607|wsl --import]] command ​(if you need to use it later) ​can directly import ''​tar.gz''​ files! 
-      * <​code>​$ ls -lh /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-08-29.tar +      * <​code>​$ ls -lh /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-10-27.tar 
- 1.4G Aug 29 17:49 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-08-29.tar+ 3.3G Oct 27 18:01 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-10-27.tar
  
-$ gzip  /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-08-29.tar+$ gzip /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-10-27.tar
  
 $ ls -lh /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_* $ ls -lh /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_*
  549M Aug 29 17:49 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-08-29.tar.gz  549M Aug 29 17:49 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-08-29.tar.gz
- 548M Sep 14 16:18 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-09-14.tar.gz</​code>​+ 548M Sep 14 16:18 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-09-14.tar.gz 
 + 1.2G Sep 19 13:52 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-09-19.tar.gz 
 + 1.3G Oct 27 18:01 /​mnt/​c/​Scratch/​your_login/​WSL/​WSL_Ubuntu_20.04.5_LTS_stdu_22-10-27.tar.gz</​code>​
  
 === Backup of specific directories === === Backup of specific directories ===
other/win10wsl.txt · Last modified: 2023/12/06 13:24 by jypeter