Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
win10:wsl [2020/03/12 22:19] – [Mounting encrypted drives] Bernard Condrauwin10:wsl [2024/04/25 16:40] (current) – [LAMP] Bernard Condrau
Line 1: Line 1:
-====== Windows Subsystem for Linux =====+====== Windows Subsystem for Linux - Debian 10.3 ===== 
 +===== Cassandra, Hera, Vulcan, Hercules, Poseidon, Iapetus =====
 ===== Installation ===== ===== Installation =====
 +  * Enable "Developer mode" in //Settings --> Update & Security --> For developers//
 +  * Press Windows key + R and run **optionalfeatures.exe**. Enable //Windows Subsystem for Linux//. Restart the computer.
   * Open Windows Power Shell as Administrator, then run the following line and reboot:<code>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux</code>   * Open Windows Power Shell as Administrator, then run the following line and reboot:<code>Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux</code>
   * Open the Microsoft Store and search for "Linux". Choose and get Debian, as per 2020-03-10 this is Debian 10 Buster.   * Open the Microsoft Store and search for "Linux". Choose and get Debian, as per 2020-03-10 this is Debian 10 Buster.
Line 10: Line 13:
 sudo apt install zip sudo apt install zip
 sudo apt install rsync</code> sudo apt install rsync</code>
-  * If you want to add a shortcut to your desktop, run the following on the command line to find the exe file:<code>which debian</code>+  * Create /run/sshd folder:<code>sudo mkdir /run/sshd</code> 
 +  * Create a shortcut to the executable on your desktop:<code>C:\Users\user\AppData\Local\Microsoft\WindowsApps\debian.exe</code>
   * The root file system can be found at a path similar to:<code>C:\Users\bco\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs</code>   * The root file system can be found at a path similar to:<code>C:\Users\bco\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4\LocalState\rootfs</code>
   * Add {{:win10:debian.ico?20|Debian}} and {{:win10:debianf.ico?20|Debian rootfs}} icons to the shortcuts   * Add {{:win10:debian.ico?20|Debian}} and {{:win10:debianf.ico?20|Debian rootfs}} icons to the shortcuts
Line 29: Line 33:
       * Run with highest privileges       * Run with highest privileges
     - Trigger     - Trigger
-      * Begin the task: At log on+      * Begin the task: At log on [OR] On an event 
 +      * (if you mount VeraCrypt volumes during boot it's better to use //On an event// and begin the task when the volumes are mounted)
       * Specific user: <user>       * Specific user: <user>
       * Enabled       * Enabled
Line 35: Line 40:
       * Action: Start a program       * Action: Start a program
       * Program/script: C:\Windows\System32\bash.exe       * Program/script: C:\Windows\System32\bash.exe
-      * Add arguments (optional): -c "sudo /etc/init.d/ssh start"+      * Add arguments (optional): -c "/usr/bin/sudo /etc/init.d/ssh start"
     - Conditions     - Conditions
       * Start the task only if the computer is on AC power       * Start the task only if the computer is on AC power
     - Settings     - Settings
       * //Uncheck// Stop the task if it runs longer than:       * //Uncheck// Stop the task if it runs longer than:
 +    - Alternative Action when starting a non elevated script "startup"
 +      * Action: Start a program
 +      * Program/script: C:\Windows\System32\bash.exe
 +      * Add arguments (optional): -c "/home/user/startup"
 +      * Script "startup":<code>#!/bin/bash
 +sudo /etc/init.d/ssh start</code>
 +
 +===== LAMP =====
 +  * [[deb12:lamp|LAMP on Debian 12 (Apache 2.4, PHP 8.3, MariaDB 10.11)]]
 +  * [[deb9:apache|Debian 9 - Apache 2.4 and PHP 7.4]]
 +  * [[deb9:mariadb|Debian 9 - MariaDB 10.3]]
  
 ===== Mounting encrypted drives ===== ===== Mounting encrypted drives =====
Line 49: Line 65:
   </Query>   </Query>
 </QueryList></code> </QueryList></code>
 +  * Remember to "Enable All Task History" under Actions tab. **<color #ed1c24>You might need to do this again after a Windows 10 major version upgrade</color>**.
 +
 +===== Mounting external drives =====
 +  mkdir /mnt/f
 +  mount -t drvfs f: /mnt/f
 ===== Links ===== ===== Links =====
   * [[https://docs.microsoft.com/en-us/windows/wsl/install-win10|Windows Subsystem for Linux Installation Guide for Windows 10]]   * [[https://docs.microsoft.com/en-us/windows/wsl/install-win10|Windows Subsystem for Linux Installation Guide for Windows 10]]