Windows 10: backing up WSL by checking date/time of file in WSL via Command Prompt

Discus and support backing up WSL by checking date/time of file in WSL via Command Prompt in Windows 10 Software and Apps to solve the problem; is there a way to check the date of a file located in WSL via the Command Prompt? I would like to initiate a backup of WSL through a batch file if the... Discussion in 'Windows 10 Software and Apps' started by drunken drag0n, Sep 15, 2024.

  1. backing up WSL by checking date/time of file in WSL via Command Prompt


    is there a way to check the date of a file located in WSL via the Command Prompt? I would like to initiate a backup of WSL through a batch file if the .bash_history file has been modified

    :)
     
    drunken drag0n, Sep 15, 2024
    #1

  2. WSL is blocked by SAC ?

    Hello,

    I'm reaching out to the community for assistance with a persistent WSL issue. Upon attempting to launch WSL, I'm encountering the following error:

    WslLaunchInteractive failed with error: 0x800711e6 - System Integrity policy has been violated. Explicit denied file.

    Steps Taken:

    1. I have reset the Ubuntu Linux distribution.
    2. I have uninstalled and reinstalled WSL.
    Despite these efforts, the issue persists. I am running Windows 11 build no: 22631.2715 with WSL 2.0.9.0, and the error occurs every time I try to start WSL.

    Has anyone faced a similar issue? Specifically, I'm seeking guidance on navigating the System Integrity policy that's seemingly causing the block. Any insights into how Smart App Control impacts WSL's functionality and possible configurations to mitigate this would be greatly appreciated.

    Thank you in advance for your time and help.
     
    shreesh gupta, Sep 15, 2024
    #2
  3. AlexisH34 Win User
    WSL problem -- all wsl commands don't work

    Hello everyone,

    I got an issue with the windows subsystem for Linux (WSL).

    Context :

    I'm using a Windows 10 lap-top shared by my company

    How I got to the problem :

    - I first reinstall windows 10

    - I installed WSL through this link .

    - Everything was working though with the Ubuntu 20.04 installed though I wanted Ubuntu 22.04

    - When I was looking at wich distro I could install by using the command :

    wsl --list --online

    - So I was like, hey maybe, I could use the command wsl --update to update my wsl, maybe it was not fully updated. I was wrong, it was my Windows not updated.

    But anyway, I tried the command, it hungs, nothing was happening...
    - I Ctrl+C to stop the execution of the cmd ; from here I could not do any command in admin power-shell, it would just hung forever.

    - But I've seen that I could still use the command in User mode not admin, though I needed to launch the distro in admin mode otherwise I had a credential issue.

    - The thing is the WSL used in non-root mode was not updated

    I didn't have the new feature with the GUI which I need for my project.

    - So in non-root powershell, I did the update command:

    wsl --update

    - And now, I can have the GUI but at that point, in my distro. Every apt update, apt install commands don't work anymore.

    - So I have to uninstall wsl in user mode to use the apt install, and reinstall it everytime to have the GUI

    That's not really what I want. I obviously already tried to uninstall everything distro and WSL. By not forgetting to remove every windows features about virtual machine, wsl and the hypervisor.

    I used this method to uninstall WSL : here is the link

    And now after reinstalling wsl in root mode. Even after uninstalling it hung forever...

    Do you have any idea to have a WSL working without reinstalling again windows ?
     
    AlexisH34, Sep 15, 2024
    #3
  4. backing up WSL by checking date/time of file in WSL via Command Prompt

    My WSL 2 is not starting, nor responding to any commands.

    Hello, welcome to the Microsoft Community.



    I understand your problem and the error code is: Wsl/InstallDistro/0x80073d05" You can try:

    - Residual files and directories: Search for residual files and directories related to WSL in the system. This may include installation directories, configuration files, registry entries, etc. For example, you can search for folders related to WSL under the directory C:\Users\<YourUsername>\AppData\Local\Packages.



    - Application data: Search for application data related to WSL in the system. You can use the Windows PowerShell command Get-AppxPackage *WindowsSubsystemForLinux* to find application data related to WSL, and then use the Remove-AppxPackage command to delete them.

    ```

    Get-AppxPackage *WindowsSubsystemForLinux* | Remove-AppxPackage

    ```



    - File system integrity: Search for file system corruption or errors. You can use the Windows PowerShell command sfc /scannow to check and repair file system errors.

    ```

    sfc /scannow

    ```

    Disclaimer: Generally, modifying registry subkeys or work group is intended for advanced users, administrators, and IT Professionals. It can help fix some problems, however, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For further protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click How to back up and restore the registry in Windows - Microsoft Support to view the article.

    - WSL registry entries: Search for WSL-related registry entries. Be careful when handling registry entries and make sure not to delete unrelated items. You can use the Registry Editor (regedit.exe) to search for and delete these entries.



    - Reinstall WSL: After completing the above steps, you can try to uninstall and reinstall WSL. Uninstall WSL using the command wsl --unregister <DistributionName> and then rerun the installation command.



    If the problem still exists, you can set the WSL version to 1 and switch the WSL version. For specific instructions on switching your WSL version, you can open the link below and find "Set WSL version to 1 or 2."

    Basic commands for WSL | Microsoft Learn



    Hope the above information helps you.



    Leo Z|Microsoft Community Support Specialist



    Welcome to Microsoft Answers!
     
    Leo Z - MSFT, Sep 15, 2024
    #4
Thema:

backing up WSL by checking date/time of file in WSL via Command Prompt

Loading...
  1. backing up WSL by checking date/time of file in WSL via Command Prompt - Similar Threads - backing WSL checking

  2. backing up WSL by checking date/time of file in WSL via Command Prompt

    in Windows 10 Gaming
    backing up WSL by checking date/time of file in WSL via Command Prompt: is there a way to check the date of a file located in WSL via the Command Prompt? I would like to initiate a backup of WSL through a batch file if the .bash_history file has been modified...
  3. WSL Windows Subsystem For Linux "wsl" command not found

    in Windows 10 Gaming
    WSL Windows Subsystem For Linux "wsl" command not found: Guys help, I've contacted ms support multiple times and none of the agents have been able to solve the issue.so, I have Windows Subsystem for Linux WSL with Ubuntu installed. yesterday, i tried to install docker, and it was kind of a mess, so i just uninstalled it in every...
  4. Wsl Installation Command timed out

    in Windows 10 Software and Apps
    Wsl Installation Command timed out: I am trying to install the WSL on my pc. I first opened windows powershell as administrator and then entered the following command: wsl --install. After 3-4 minutes, it showed "the operation timed out". How to resolve this issue please help me...
  5. Wsl Installation Command timed out

    in Windows 10 BSOD Crashes and Debugging
    Wsl Installation Command timed out: I am trying to install the WSL on my pc. I first opened windows powershell as administrator and then entered the following command: wsl --install. After 3-4 minutes, it showed "the operation timed out". How to resolve this issue please help me...
  6. Wsl Installation Command timed out

    in Windows 10 Gaming
    Wsl Installation Command timed out: I am trying to install the WSL on my pc. I first opened windows powershell as administrator and then entered the following command: wsl --install. After 3-4 minutes, it showed "the operation timed out". How to resolve this issue please help me...
  7. WSL problem -- all wsl commands don't work

    in Windows 10 Installation and Upgrade
    WSL problem -- all wsl commands don't work: Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the problem :- I first reinstall windows 10 - I installed WSL through this link .- Everything was working though with the Ubuntu...
  8. WSL problem -- all wsl commands don't work

    in Windows 10 Gaming
    WSL problem -- all wsl commands don't work: Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the problem :- I first reinstall windows 10 - I installed WSL through this link .- Everything was working though with the Ubuntu...
  9. WSL problem -- all wsl commands don't work

    in Windows 10 Software and Apps
    WSL problem -- all wsl commands don't work: Hello everyone,I got an issue with the windows subsystem for Linux WSL.Context :I'm using a Windows 10 lap-top shared by my companyHow I got to the problem :- I first reinstall windows 10 - I installed WSL through this link .- Everything was working though with the Ubuntu...
  10. WSL does not show a command line prompt.

    in Windows 10 BSOD Crashes and Debugging
    WSL does not show a command line prompt.: Hi, I have trouble starting WSL. The window opens, but I cannot type anything. It is showing a black/blue window with a blinking prompt. I rebooted my system and it still doing that. Any idea how to fix this?...