在Windows 10 BASH和Ubuntu子系统 [英] BASH and Ubuntu subsystem in Windows 10

查看:153
本文介绍了在Windows 10 BASH和Ubuntu子系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪里是新的Linux子系统和Bash都位于在Windows 10?

Where is new Linux subsystem and Bash are located in Windows 10?

我想知道这是因为我需要10桌面复制一个文件说prog.c中从我的窗户,这本Linux子系统的主目录编译使用gcc,所以我将不再需要写我的文件目录各一次。

I want to know this because I need to copy a file say "prog.c" from my windows 10 desktop to home directory of this linux subsystem for compilation using gcc so I won't be needed to write directory of my file each time.

推荐答案

第一次打开BASH和类型
GCC
如果它给像消息GCC:致命错误:没有输入文件
那么就意味着成功安装GCC,如果它不然后尝试

first open BASH and type gcc if it gives a message like "gcc : fatal error: no input files " then it means that GCC is successfully installed, if it doesn't then try

$ sudo易于安装建立必要的
这将安装gcc,弯曲,野牛等。

$ sudo apt install build-essential this will install gcc,flex,bison etc.

如果是的话,
然后尝试
CD (更改目录命令)

if it does, then try cd(change directory command) like

CD C:\\用户\\<用户名>用户名> \\桌面(添加您的用户名&LT ;
然后,

cd C:\Users\<username>\Desktop (add your User Name in <username>) then,

GCC prog1.c的将编译程序以及

./ a.out的应该运行该程序。

这篇关于在Windows 10 BASH和Ubuntu子系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆