一、在windows下体验Linux方法
(一)、 windows terminal+oh-my-posh+posh-git + PSReadline(如果使用的是PowerShell Core则需要安装PSReadline) 【win10】
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
// 如果您使用的是PowerShell Core,请安装PSReadline:
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
3、修改脚本执行策略
在PowerShell上以管理员身份运行
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
4、配置oh-my-posh+posh-git
在PowerShell上使用指令notepad $PROFILE 或你选择的文本编辑器打开PowerShell配置文件 添加如下启动脚本:
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme paradox
5、重启PowerShell即可
image.png
6、推荐资料
7、Powershell Core (非Windows自带的Powershell) 步骤
(二)、 Windows Subsystem for Linux (WSL)组件框架【win10】
(三)、win7之前 使用 Windows Services for UNIX
二、安装cygwin及Linux一些指令(不推荐)
image.png
image.png
3、将 China的镜像网址如 http://mirrors.163.com/cygwin/ 添加至 cygwin 并点击下一步
image.png
4、搜索cygwin 没有自带的指令名称如 wget (为了断点续传 wget -c 或镜像网站wget –mirror )点击下一步
image.png
这里有个坑,就是一定要点Skip 显示版本后再 点击下一步
5、安装至最后一步时记得添加Cygwin图标至桌面,这样方便使用 Cygwin64 Terminal;
6、安装其他Linux指令如浏览网页lynx、links、w3m的时,可以点击cygwin 安装包setup-x86_64.exe 循环执行上面的步骤即可;
lynx
links
w3m
三、推荐资料