精华内容
下载资源
问答
  • Windows WSL

    2020-12-29 15:37:35
    <div><p>I have the program running on windows sub system for linux but the app cannot connect to the WSL instance. The website and razer see it but the app is having trouble. Do i need to open ports ...
  • windows WSL安装

    2021-01-18 18:55:42
    https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps 以WSL2为例 他有简单安装和手动安装两个方式 这里选择手动安装 第一步 启动Linux子系统 用管理员身份打开powershell,然后...

    这里依据的是微软自己的教程
    https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps
    以WSL2为例

    他有简单安装和手动安装两个方式

    这里选择手动安装

    第一步

    启动Linux子系统
    用管理员身份打开powershell,然后输入命令

    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    

    第二步

    检查win10版本,WSL2对版本有要求,如果只想安装WSL1,可以快进到第六步

    To update to WSL 2, you must be running Windows 10.

    • For x64 systems: Version 1903 or higher, with Build 18362 or higher.
    • For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
    • Builds lower than 18362 do not support WSL 2. Use the Windows Update Assistant to update your version of Windows.

    使用win+R ,打开winver
    在这里插入图片描述

    第三步

    启用虚拟机功能
    用powershell执行

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    

    然后重启电脑

    第四步

    安装Linux 内核更新包
    https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

    第五步

    将 WSL 2 设置为默认版本
    用powershell执行

    wsl --set-default-version 2
    

    第六步

    在微软应用商城安装Linux 发行版

    在这里插入图片描述

    第七步

    安装完了启动之,然后需要设定初始的账号和密码
    在这里插入图片描述
    然后就安装完成了

    展开全文
  • m using <code>zsh</code> in a Windows WSL environment, ~/.zshrc</code> is setup based on output from <code>hh -z</code>. <p>When hitting CTRL+R, I get the history list but when selecting a ...
  • Windows WSL2安装

    千次阅读 2020-06-27 11:29:52
    WSL(Windows Subsystem for Linux)使开发人员可以直接在未经修改的Windows上运行GNU / Linux环境-包括大多数命令行工具,实用程序和应用程序,而无需传统虚拟机或双启动设置的开销。 WSL 2是用于Linux的Windows子...

    wsl2子系统简介

    官方文档:https://docs.microsoft.com/en-us/windows/wsl/

    WSL(Windows Subsystem for Linux)使开发人员可以直接在未经修改的Windows上运行GNU / Linux环境-包括大多数命令行工具,实用程序和应用程序,而无需传统虚拟机或双启动设置的开销。

    WSL 2是用于Linux的Windows子系统体系结构的新版本,WSL 2使用了全新的体系结构,该体系结构受益于运行真正的Linux内核。

    wsl2安装

    官方文档:https://docs.microsoft.com/en-us/windows/wsl/install-win10

    安装要求:Windows 10, updated to version 2004, Build 19041 or higher

    PS C:\Users\Administrator> Get-ComputerInfo | select WindowsProductName, WindowsVersion, OsHardwareAbstractionLayer
    
    WindowsProductName WindowsVersion OsHardwareAbstractionLayer
    ------------------ -------------- --------------------------
    Windows 10 Pro     2004           10.0.19041.1
    

    cmd中执行powershell命令,开启Windows Subsystem for Linux特性

    powershell
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    

    开启Virtual Machine Platform特性

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    

    重启以更新到wsl2

    restart-computer
    

    设置WSL 2为默认版本

    wsl --set-default-version 2
    

    首选需要更新 WSL 2 Linux 内核:https://docs.microsoft.com/zh-cn/windows/wsl/wsl2-kernel

    然后重新设置WSL 2为默认版本

    wsl --set-default-version 2
    

    应用商店搜索并安装linux发行版本,以ubuntu为例,安装完成后可以以root登录:

    ubuntu@desktop:~$ sudo -i
    [sudo] password for ubuntu:
    Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.19.104-microsoft-standard x86_64)
    

    确认wsl版本

    wsl --list --verbose
    

    关闭和开启

    #启动默认的WSL2 和 Linux
    $wsl
    
    #关闭所有正在运行的 Linux 和 WSL 2
    wsl --shutdown
    

    问题排查

    https://docs.microsoft.com/zh-cn/windows/wsl/wsl2-faq

    当前vmware workstation 15.5.5以及virtualbox 6.0已经能够兼容基于 Hyper-V的WSL2,但是当勾选虚拟化引擎相关功能时vmware依然无法与Hyper-V共存。提示vmware workstation 在此主机上不支持嵌套虚拟化。

    vmware workstation does not support nested virtualization on this host. module ‘monitor mode’ power on failed
    

    在这里插入图片描述
    目前的解决方法只能是两者选一,参考:https://communities.vmware.com/thread/634674

    #如果使用vmware在powershell中执行以下命令然后重启系统
    bcdedit /set hypervisorlaunchtype off
    
    #如果使用hyper-v执行以下命令开启
    bcdedit /set hypervisorlaunchtype auto
    
    展开全文
  • Windows WSLWindows Terminal 工具

    千次阅读 2019-10-18 12:10:36
    WSL 的全称是 Windows Subsystem for Linux。这使得我们在 Windows 上直接使用 Linux 环境,比通过 VMware、VirtualBox 安装虚拟机更为便捷。至于性能,有看到网友进行了简单测试,与虚拟机里的系统不相上下。微软有...

    WSL 的全称是 Windows Subsystem for Linux。这使得我们在 Windows 上直接使用 Linux 环境,比通过 VMware、VirtualBox 安装虚拟机更为便捷。至于性能,有看到网友进行了简单测试,与虚拟机里的系统不相上下。微软有在开发更高性能的 WSL2,不过还没正式放出。

    基于 WSL 安装的 Linux 发行版都会有一个命令行终端,但比较难用。可以选择安装微软官方开发的”Windows Terminal“,目前还是预览版,但已经挺好用了。

    如果发现系统不满足条件安装 WSL 和 Windows Terminal,需要升级到最新。

    开启 WSL 相关可选组件

    以管理员身份打开 PowerShell 并运行:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

    按输出提示,重启系统后生效。

    在 WSL 上安装 Linux 发行版系统

    打开系统自带的应用商店(Microsoft Store),搜索 Linux,即可看到多种 Linux 发行版。可以选择安装一个或多个。安装完后启动对应的发行版 Linux,会进行首次的初始化,需要输入用户名和密码设置。

    然后按照个人需要修改软件源,安装 vim、g++、git 等工具软件。

    安装及配置 Windows Terminal

    同样是应用商店搜索安装。

    新版本的 Windows Terminal 大为简化了配置。样式和快捷键需要自己再配置。以下是参考。

    // https://github.com/microsoft/terminal/blob/master/doc/cascadia/SettingsSchema.md
    // https://github.com/microsoft/terminal/blob/06bd7e22da183619b99b632e10e186d441b05e45/src/cascadia/TerminalApp/defaults.json
    
    // To view the default settings, hold "alt" while clicking on the "Settings" button.
    // For documentation on these settings, see: https://aka.ms/terminal-documentation
    
    {
        "$schema": "https://aka.ms/terminal-profiles-schema",
        "defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
    
        "profiles":
        [
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "hidden": false,
                "name": "Ubuntu",
                "source": "Windows.Terminal.Wsl",
                "fontSize": 14,
                "fontFace": "Consolas",
                "cursorShape": "filledBox",
                "historySize": 10000,
                "colorScheme":"Dracula"
            },
            {
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f519}",
                "commandline": "ssh.exe jack@192.168.1.60",
                "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png",
                "hidden": false,
                "name": "ssh1.60",
                "fontSize": 14,
                "fontFace": "Consolas",
                "cursorShape": "filledBox",
                "historySize": 10000,
                "colorScheme":"Dracula"
            },
            {
                // Make changes here to the powershell.exe profile
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
                "name": "Windows PowerShell",
                "commandline": "powershell.exe",
                "hidden": false
            },
            {
                // Make changes here to the cmd.exe profile
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
                "name": "cmd",
                "commandline": "cmd.exe",
                "hidden": false
            },
            {
                "guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
                "hidden": false,
                "name": "Azure Cloud Shell",
                "source": "Windows.Terminal.Azure"
            }
        ],
    
        // Add custom color schemes to this array
        "schemes": [
            {
                "background":  "#282A36",
                "black":  "#21222C",
                "blue":  "#F1FA8C",
                "brightBlack":  "#6272A4",
                "brightBlue":  "#D6ACFF",
                "brightCyan":  "#A4FFFF",
                "brightGreen":  "#69FF94",
                "brightPurple":  "#FF92DF",
                "brightRed":  "#FF6E6E",
                "brightWhite":  "#FFFFFF",
                "brightYellow":  "#FFFFA5",
                "cyan":  "#8BE9FD",
                "foreground":  "#F8F8F2",
                "green":  "#50FA7B",
                "name":  "Dracula",
                "purple":  "#BD93F9",
                "red":  "#FF5555",
                "white":  "#F8F8F2",
                "yellow":  "#F1FA8C"
            }
        ],
    
        // Add any keybinding overrides to this array.
        // To unbind a default keybinding, set the command to "unbound"
        "keybindings": [
            { "command": "newTabProfile0", "keys": ["ctrl+shift+1"] },
            { "command": "newTabProfile1", "keys": ["ctrl+shift+2"] },
            { "command": "newTabProfile2", "keys": ["ctrl+shift+3"] },
            { "command": "newTabProfile3", "keys": ["ctrl+shift+4"] },
            { "command": "newTabProfile4", "keys": ["ctrl+shift+5"] },
            { "command": "newTabProfile5", "keys": ["ctrl+shift+6"] },
            { "command": "newTabProfile6", "keys": ["ctrl+shift+7"] },
            { "command": "newTabProfile7", "keys": ["ctrl+shift+8"] },
            { "command": "newTabProfile8", "keys": ["ctrl+shift+9"] },
            { "command": "nextTab", "keys": ["ctrl+tab"] },
            { "command": "paste", "keys": ["ctrl+shift+v"] },
            { "command": "prevTab", "keys": ["ctrl+shift+tab"] },
            { "command": "scrollDown", "keys": ["ctrl+shift+down"] },
            { "command": "scrollDownPage", "keys": ["ctrl+shift+pgdn"] },
            { "command": "scrollUp", "keys": ["ctrl+shift+up"] },
            { "command": "scrollUpPage", "keys": ["ctrl+shift+pgup"] },
            { "command": "switchToTab0", "keys": ["alt+1"] },
            { "command": "switchToTab1", "keys": ["alt+2"] },
            { "command": "switchToTab2", "keys": ["alt+3"] },
            { "command": "switchToTab3", "keys": ["alt+4"] },
            { "command": "switchToTab4", "keys": ["alt+5"] },
            { "command": "switchToTab5", "keys": ["alt+6"] },
            { "command": "switchToTab6", "keys": ["alt+7"] },
            { "command": "switchToTab7", "keys": ["alt+8"] },
            { "command": "switchToTab8", "keys": ["alt+9"] }
        ]
    }

    Windows Terminal 配置 SSH

    配置中有一个叫 ssh1.60 的 profile,是用来登陆远程主机的。这也是一个便捷的用法。配合 ssh 的公钥登陆,就更方便了。

    • PoweShell 下执行 ssh-keygen.exe 生成公钥私钥文件。

    • C:\Users\Username\.ssh\id_rsa.pub 获取公钥,配置到远程主机。

    win10 WSL2 引起的 VirtualBox 启动问题》https://blog.csdn.net/engrossment/article/details/99431539

    2019年10月18日

    展开全文
  • windows wsl1 update to wsl2

    2020-11-29 21:52:15
    To update to WSL 2, you must be running Windows 10. Requirements For x64 systems: Version 1903 or higher, with Build 18362 or higher. 1. Before installing WSL 2, you must enable the Virtual Machine ...
    To update to WSL 2, you must be running Windows 10.
    Requirements
    For x64 systems: Version 1903 or higher, with Build 18362 or higher.
    1.
    	Before installing WSL 2, you must enable the Virtual Machine Platform optional feature.
    	Open PowerShell as Administrator and run:
    	dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    2.
    	Download the Linux kernel update package
    	https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
    3. 
    	切换wsl版本
    
    展开全文
  • Windows WSL2 htop打开黑屏的问题解决

    千次阅读 2020-05-21 20:40:40
    Windows WSL2 htop打开黑屏的问题解决 Update: it’s not as straightforward as I’d thought. The ppa contains packages for focal and have dependency issues with bionic. Further, focal has newer versions ...
  • wsl里面输入/mnt/x 就可以进入x盘了, 不过u盘是不行的。
  • Windows WSL安装ROS

    2021-02-27 21:45:52
    ros是一个很大的软件,现在支持windows,以前仅支持linux,没有接触之前可能觉得安装使用很繁琐,其实按照官网的步骤,几个命令复制粘贴一下,比想象中的简单多了,以下是一个简明实用的安装教程及注意事项。...
  • Relion GPU on Windows WSL2

    2020-12-30 11:08:24
    <p>Recently there was released a CUDA driver that allows the GPU computing on the Windows Subsystem Linux (WSL) 2 <a href="https://developer.nvidia.com/cuda/wsl/download">WSL driver</a>. Thus, I ...
  • Windows 安装WSL2 1.打开"启用或关闭Windows功能"面板 2.启用"适用于Linux的Windows 子系统" 注意:重启电脑 3.启用"虚拟机平台" 注意:重启电脑,启用这两个功能需要分两步启用,要重启两次电脑,被坑过!!! 4.在微软...
  • <div><p>I tried to compile the wallet under the windows subsystem for linux. I used this: https://github.com/gridcoin/Gridcoin-Research/blob/master/doc/build-msw.txt instruction to do it.</p> <p>But I...
  • Windows WSL中安装Android Studio

    千次阅读 2019-03-13 10:35:22
    1. 安装WSL 我使用的是Windows10 1803版本,安装的是Ubuntu16.04 LTS版本。 参考:Windows Subsystem for Linux Installation Guide for Windows 10 2. 配置图形界面 2.1 X Server安装 首先在Windows上安装X Server...
  • <div><p>Windows build 1903 doesn't yet support MAP_GROWSDOWN. Also, Windows-1903 doesn't support fcntl on pipes, and so 'make check' fails when it tries to use pipes for the test. <p>...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 5,800
精华内容 2,320
关键字:

windowswsl