zoukankan      html  css  js  c++  java
  • windows10上运行Linux Bash Shell

    前言

    对于熟悉Linux运维的工程师,如果能在Windows上运行Bash shell的话,会比用可恶的dos命令舒服得多。Windows确实提供了这样的功能。

    1.打开开发者模式

    "设置"->"更新和安全"->"开发者选项"->"开发人员模式"

    2.安装"适用于Linux的Windows子系统"


    按提示重启电脑

    3.安装

    运行-cmd-输入bash

    提示访问https://aka.ms/wslstore 下载安装Linux分发版。

    访问网页,提示打开Microsoft Store

    选择你喜欢的发行版。一般来说选择Ubuntu

    点击开始下载

    下载完毕后,点击启动开始安装并启动

    设置Linux用户和密码

    4.开始你的bash之旅

    重新打开cmd框,输入bash。

    5.troubleshoot

    在windows应用商店安装ubuntu系统,报错WslRegisterDistribution failed with error: 0x8007019e

    1. 报错:
    Installing, this may take a few minutes...
    Installation Failed!
    Error: 0x8007019e
    Press any key to continue...
    
    1. 原因:

    未安装Windows子系统支持。

    1. 解决办法:
      1.win+x,选择Windows PowerShell(管理员)
      2.输入:

    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    3. 回车,输入Y,重启!
    4. 重新打开已经安装的子系统,等几分钟,输入账户和密码。

    参考
    https://blog.csdn.net/qq_33033367/article/details/828209

  • 相关阅读:
    980不同路径III
    输入函数
    IDEA更新maven依赖包
    join()函数
    方差偏差困境
    np.bincount()函数
    72编辑距离
    741摘樱桃
    523连续的子数组和
    1306跳跃游戏III
  • 原文地址:https://www.cnblogs.com/fander/p/10551391.html
Copyright © 2011-2022 走看看