linux bash命令怎么用?win10 linux bash命令使用教程
时间:2023-09-15 20:02:55
linux bash命令怎么用?微软在win10一周年更新预览版中加入了ubuntu bash命令支持,但是很多用户并不知道怎么使用。今天小编就针对这个问题给大家介绍下win10系统linux bash命令使用教程。
win10版linux bash命令使用教程:
1、没安装Bash的用户可以按照之前介绍的方法,先在设置→更新和安全→针对开发人员中选择“开发人员模式”,点击后会下载“开发人员模式包”,如下图:
linux bash命令
但有时这个包会下载不成功,出现如下图提示:
linux bash命令
2、此时也无需担心,上一步如果不顺利,可以在后续步骤中弥补。此时进入控制面板→程序和功能→启用或关闭Windows功能,勾选“适用于Linux的Windows子系统(Beta)”,点击“确定”后安装,如下图——
linux bash命令
3、安装后需要重启,然后打开命令提示符,执行如下命令即可开启(可直接在管理员模式下输入Bash命令开启):
C:windowssystem32ash.exe
4、如果第一步安装不顺利,此时可能就需要从商店下载所需组件,顺利与否还得看网络状况,测试中就遇到如下“鬼畜”情况:
linux bash命令
5、由上图可见,下载安装的过程中需要用户创建Unix账户,因此要设定账户密码,在输入密码的过程中,密码文字不可见,需要输入两遍,你心里要有数,设置成功后就可以使用了
6、功能命令可用bash --help来查询,在使用的话要在前面加上“bash”,例如:
bash --debug
bash --init-file
bash --version
linux bash命令
7、如果要运行Linux命令,可采用如下格式(注意 c 和前引号间的空格,如上图):
bash -c "linux命令"
例如:
bash -c "echo Hello from IThome"
bash -c "ls /mnt/c"
bash -c "lsb_release -a"
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win7系统中安装ArcGIS时许可管理器无法启动的解决步骤
![](https://img.aspxhome.com/file/2023/27/a229744_0s.png)
Win10怎么切换账户?Win10系统切换账户的方法教程
![](https://img.aspxhome.com/file/2023/26/a220018_0s.png)
Snapseed不得不知的七大特色功能
![](https://img.aspxhome.com/file/2023/8/a339552_0s.jpg)
Win10提示无法设置移动热点怎么办?Win10提示无法设置移动热点的方法
![](https://img.aspxhome.com/file/2023/25/a217355_0s.jpg)
win10系统中C盘的垃圾如何清理?如何使用磁盘清理win10的C盘?
![](https://img.aspxhome.com/file/2023/6/46686_0s.png)
让常用输入法与WPS文字同时出现
realpopup.exe - realpopup是什么进程
Win10宽带连接失败错误代码651的解决方法
![](https://img.aspxhome.com/file/2023/26/a227606_0s.jpg)
手机不能打电话了怎么办 解决手机无法打电话的方法
![](https://img.aspxhome.com/file/2023/6/a325175_0s.png)
qsv格式怎么转换成flv
![](https://img.aspxhome.com/file/2023/8/a338399_0s.jpg)
超星尔雅怎么自动播放下一集?
![](https://img.aspxhome.com/file/2023/7/a327129_0s.png)
使用Excel表格计算两个日期间的间隔的方法
360浏览器热点资讯怎么关闭?360浏览器热点资讯删除教程
![](https://img.aspxhome.com/file/2023/7/a328529_0s.jpg)
Win11怎么设置圆角窗口?Win11设置圆角窗口教程
![](https://img.aspxhome.com/file/2023/27/a238517_0s.jpg)
wps文字环绕功能怎么使用怎么用
Win7电脑文件夹无法删除怎么办?
![](https://img.aspxhome.com/file/2023/5/a314163_0s.png)
wps如何制作比例表
![](https://img.aspxhome.com/file/2023/5/a170345_0s.png)
微信最新的吃瓜打脸狗头表情在哪里?
![](https://img.aspxhome.com/file/2023/7/a330605_0s.jpg)
电脑版WPS演示文稿怎么压缩图片
![](https://img.aspxhome.com/file/2023/6/a183266_0s.png)
Win8系统开启IE浏览器中的activex控件的方法
![](https://img.aspxhome.com/file/2023/28/a242499_0s.jpg)