- Bash on windows github
- About
- Bash on windows github
- Bash on windows github
- Bash on windows github
- bsara / git-ssh-auth-win-setup.md
- This comment has been minimized.
- pensebien commented Nov 28, 2017 •
- This comment has been minimized.
- rianquinn commented Feb 27, 2018
- This comment has been minimized.
- leoreeves commented Mar 6, 2018 •
- This comment has been minimized.
- pauljohn32 commented Mar 18, 2018
- This comment has been minimized.
- smutel commented Mar 22, 2018
- This comment has been minimized.
- gregbown commented May 14, 2018
- This comment has been minimized.
- demiters commented Aug 27, 2018
- This comment has been minimized.
- fushenghua commented Sep 4, 2018
- This comment has been minimized.
- bonovski commented Sep 13, 2018
- This comment has been minimized.
- surjikal commented Sep 15, 2018
- This comment has been minimized.
- Tri125 commented Jan 2, 2019
Bash on windows github
Bash On Ubuntu On Windows
This is a collaborative document where we help new bash users get the basics things working in Bash. It’s especially targeted for the users of Bash On Ubuntu On Windows — where the bash environment is fairly new.
In other words: Here we share resources, tips, known issues etc for Bash On Ubuntu On Windows.
1. How to Install Bash on Ubuntu in Windows 10 (Windows Subsystem for Linux)
- Install the Windows 10 Anniversary Update
- Go to «Turn Windows features on or off»
- Scroll down to «Windows subsystem for Linux (Beta)»
2. Start an bash ssh-agent on launch
2.1: Open the config
2.2: Add the following somewhere:
2.3: Then run source
/.bashrc to reload your config.
3. Troubleshoot ssh-agent forwarding
Connect with ssh and check if you forward your keys by running echo «$SSH_AUTH_SOCK» . If you get no output, that means it’s not working. Make sure it’s running (above script should work) and that your
/.ssh/config is configured to run ForwardAgent, for example:
4. Use Windows 10 Virtual desktop to have your own workspace
Create a new virtual desktop from Win+Tab and setup your ubuntu workspace. Or run 4 terminals on that screen, for different ssh sessions for example. Switch desktops easily and fast by either Win+Ctrl+left / Win+Ctrl+right or win+tab tab enter
5. How to access the filesystem from Windows / Ubuntu
In Ubuntu, you can find your entire C drive under /mnt/c . (You have the same permissions as the User you launched Ubuntu with)
In Windows, you can find your entire Ubuntu installation under %LocalAppData%\lxss . (C:/Users/YOURUSERNAME/AppData/Local/lxss)
Note: Your ubuntu installation might end up on different paths depending on installation method, check this guide to find yours
6. Make full use of Interop
With interoperability, you can open Windows programs from WSL. Here are some ways to use to your advantage:
6.1: Set a Default Windows Browser
Some commands, such as Heroku CLI’s heroku open , need to open a browser. There’s no default browser in WSL by default, but one easy way to set this up is by adding the following to
6.2: Use Symlinks to open Windows Programs
One use case is to open your text editor to the current directory. Interop + symlinks make this possible. For example:
Now in any directory, type code and your text editor opens. Even better, type code . and it opens that directory, ready for editing.
6.3: wslview command
If you are used to using the open command in a terminal on macOS, the equivalent command for WSL is wslview . If you wish to use open in the same way, you can add the following to the end of your
Now you can use open like you would in macOS.
7. Disable ding/beep/bell sound when tabbing
You know that annoying bell sound you get when you try to autocomplete something and it doesn’t exist? It’s super loud and annoying, so lets mute it. Run this command and restart your shell to give peace to your ears:
echo ‘set bell-style none’ >>
Restart your shell and it’s quiet 🙂
8. How to configure proxy settings in apt
If your network uses a proxy-server, services like apt-get, git, wget, and curl, etc. would not be able to access internet directly.
There is an open source tool : ProxyMan, which lets you easily configure system-wide proxy settings from the command-line in one go. Download latest release. As of now, ProxyMan is capable of managing GNOME desktop, /etc/environment, .bashrc, apt.conf, git, npm, and Dropbox proxy settings
However, you can also manually modify the configuration file.
To add prox in apt, modify /etc/apt/apt.conf and add the following:
Do a sudo apt-get update afterwards to update repository infromation
username: johnwick password password proxy-server proxy.foobar.com port 8080
To add system wide proxy settings, go to /etc/environment and add the following:
Use source /etc/environment to load the new environment variables.
To make git work behind proxy use the following commands
9. Program compatibility — What works, what doesn’t?
This crowdsourced list of programs and their compatibility gives you a searchable list for compatibility. Want to know if apt works 100%? Just check the list. Also worth a mention, the Official repository contains a full list of all issues reported.
10. Mapping a Driver Letter to your linux root folder
Open a Windows Terminal (cmd) and:
Now you can access the root linux folder typing l: in the Windows Command, or Explorer.
About
Resources, tips, known issues etc for «Bash On Ubuntu On Windows»
Bash on windows github
This repo is for the reporting of issues found within and when using Bash on Ubuntu on Windows.
###Labels This and our User Voice page are your best ways to interact directly with the Bash on Ubuntu on Windows teams. We will be monitoring and responding to issues as best we can. Please attempt to avoid filing duplicates of open or closed items when possible. In the spirit of openness we will be tagging issues with the following:
bug – We consider this issue to be a bug internally. This tag is generally for bugs in implemented features, or something we consider to be a “bug level” change. Things marked with Bug have a corresponding bug in on Microsoft’s internal bug tracking system.
- Example: No internet connectivity in Bash (#5)
feature – Denotes something that is not yet implemented. The community should use our User Voice page for voting on which features everyone feels as the most important. The team will take the User Voice page as input in deciding what to work on next.
- Example: Docker is not working (#85)
discussion – Denotes a discussion on the board that does not relate to a specific feature.
- Example: Windows Subsystem for Linux is not open source (#178)
fixinbound – When possible, we will mark bugs that have been fixed internally. Unfortunately we cannot say specifically when the bug will hit the insider flights.
bydesign – Denotes that an issue is raised that we consider is working as intended. We will give some reasoning why this is by design. After one week we will either close the issue or mark as Discussion depending on what comes up.
Additional tags may be used to denote specific types of issues. These include items such as network or symlink.
###Closing Issues may be closed by the original poster at any time. We will close issues if:
- One week passes after the change goes out to the Insider Fast ring
- An issue is clearly a dup of another. The duplicate will be linked
- Any discussion that has clearly run its course
Bash on windows github
This repo is for the reporting of issues found within and when using Bash on Ubuntu on Windows.
###Labels This and our User Voice page are your best ways to interact directly with the Bash on Ubuntu on Windows teams. We will be monitoring and responding to issues as best we can. Please attempt to avoid filing duplicates of open or closed items when possible. In the spirit of openness we will be tagging issues with the following:
bug – We consider this issue to be a bug internally. This tag is generally for bugs in implemented features, or something we consider to be a “bug level” change. Things marked with Bug have a corresponding bug in on Microsoft’s internal bug tracking system.
- Example: No internet connectivity in Bash (#5)
feature – Denotes something that is not yet implemented. The community should use our User Voice page for voting on which features everyone feels as the most important. The team will take the User Voice page as input in deciding what to work on next.
- Example: Docker is not working (#85)
discussion – Denotes a discussion on the board that does not relate to a specific feature.
- Example: Windows Subsystem for Linux is not open source (#178)
fixinbound – When possible, we will mark bugs that have been fixed internally. Unfortunately we cannot say specifically when the bug will hit the insider flights.
bydesign – Denotes that an issue is raised that we consider is working as intended. We will give some reasoning why this is by design. After one week we will either close the issue or mark as Discussion depending on what comes up.
Additional tags may be used to denote specific types of issues. These include items such as network or symlink.
###Closing Issues may be closed by the original poster at any time. We will close issues if:
- One week passes after the change goes out to the Insider Fast ring
- An issue is clearly a dup of another. The duplicate will be linked
- Any discussion that has clearly run its course
Bash on windows github
This repo is for the reporting of issues found within and when using Bash on Ubuntu on Windows.
###Labels This and our User Voice page are your best ways to interact directly with the Bash on Ubuntu on Windows teams. We will be monitoring and responding to issues as best we can. Please attempt to avoid filing duplicates of open or closed items when possible. In the spirit of openness we will be tagging issues with the following:
bug – We consider this issue to be a bug internally. This tag is generally for bugs in implemented features, or something we consider to be a “bug level” change. Things marked with Bug have a corresponding bug in on Microsoft’s internal bug tracking system.
- Example: No internet connectivity in Bash (#5)
feature – Denotes something that is not yet implemented. The community should use our User Voice page for voting on which features everyone feels as the most important. The team will take the User Voice page as input in deciding what to work on next.
- Example: Docker is not working (#85)
discussion – Denotes a discussion on the board that does not relate to a specific feature.
- Example: Windows Subsystem for Linux is not open source (#178)
fixinbound – When possible, we will mark bugs that have been fixed internally. Unfortunately we cannot say specifically when the bug will hit the insider flights.
bydesign – Denotes that an issue is raised that we consider is working as intended. We will give some reasoning why this is by design. After one week we will either close the issue or mark as Discussion depending on what comes up.
Additional tags may be used to denote specific types of issues. These include items such as network or symlink.
###Closing Issues may be closed by the original poster at any time. We will close issues if:
- One week passes after the change goes out to the Insider Fast ring
- An issue is clearly a dup of another. The duplicate will be linked
- Any discussion that has clearly run its course
bsara / git-ssh-auth-win-setup.md
Setup SSH Authentication for Git Bash on Windows
- Create a folder at the root of your user home folder (Example: C:/Users/uname/ ) called .ssh .
- Create the following files if they do not already exist (paths begin from the root of your user home folder):
- .ssh/config
- .bash_profile
- .bashrc
Create a New SSH Key
Follow the steps in the section named «Generating a new SSH Key» found in the following documentation from GitHub: Generating a new SSH key and adding it to the ssh-agent
Configure SSH for Git Hosting Server
Add the following text to .ssh/config ( .ssh should be found in the root of your user home folder):
Enable SSH Agent Startup Whenever Git Bash is Started
First, ensure that following lines are added to .bash_profile , which should be found in your root user home folder:
Now, add the following text to .bashrc , which should be found in your root user home folder:
This comment has been minimized.
Copy link Quote reply
pensebien commented Nov 28, 2017 •
Thank you for the gist. But I found it easy to just add to my
./profile file
localUser@mycomputer MINGw64 / notepad /.profile
then I Paste this
I also took time to read about ssh-agent
This comment has been minimized.
Copy link Quote reply
rianquinn commented Feb 27, 2018
This worked perfectly, Thanks
This comment has been minimized.
Copy link Quote reply
leoreeves commented Mar 6, 2018 •
@emmaakin, thanks that works great. FYI, there’s a backtick at the start and end your code snippet that will cause an error.
This comment has been minimized.
Copy link Quote reply
pauljohn32 commented Mar 18, 2018
The part that launches the ssh agent is valuable. However, I’m not persuaded there is a benefit in the git config file. The Default key name is «id_rsa» and that is what ssh will look for. I think the config file is not having an effect. At least for me.
In my case, the name of the key is different for every server and, for reasons I cannot understand, the ssh system only wants to look for «id_rsa». On Linux, this is a symptom of a permissions problem, permissions should be 700. But in Windows, it appears not possible to set permissions at all. In the Git bash shell, permissions always have g+r and o+r.
The config file is ignores, at least for me. You can see same result if you name your key in another file, put in
And it wont work. If it does work, I’d love to hear from you.
This comment has been minimized.
Copy link Quote reply
smutel commented Mar 22, 2018
If you use an old dsa key, put this in config PubkeyAcceptedKeyTypes=+ssh-dss
This comment has been minimized.
Copy link Quote reply
gregbown commented May 14, 2018
Wow! First of all, thank you! I am astonished as to why none of this presented anywhere on GitHub? I spent a couple of hours looking for the missing steps, All they say is paste your public key here with no mention of how GitHub is supposed to find the private key on Windows, where it should be stored, what else is required, etc.
The only thing I would add to this is that if you are generating you keys with PuTTY Key Generator, you must select from the menu -> Conversions -> Export SSH key(force new file format) and save the private key as just «id_rsa» NOT id_rsa.ppk the default PuTTY format
Thank you again Brandon
This comment has been minimized.
Copy link Quote reply
demiters commented Aug 27, 2018
This comment has been minimized.
Copy link Quote reply
fushenghua commented Sep 4, 2018
This comment has been minimized.
Copy link Quote reply
bonovski commented Sep 13, 2018
Thank you, works perfectly!
bitbucket and github are really missing these crucial steps, lost almost 8 hours setting it up on windows.
This comment has been minimized.
Copy link Quote reply
surjikal commented Sep 15, 2018
I added this to /etc/ssh/ssh_config so that I could use a shared deployment key for all users on my server. Thanks for the info!
This comment has been minimized.
Copy link Quote reply
Tri125 commented Jan 2, 2019
If you want to add multiple keys to the agent simply replace the line ssh-add
/.ssh/id_rsa; with the following block:
This will add every ssh key that start with id_
The inconvenience is that when the ssh-agent start, it’s going to prompt you to enter the password for every keys even if you don’t necessarily use them. I haven’t found a solution for this.
You might want to use that with git for windows if, say, you have a different github account: 1 for your personal work and another for your professional work. Github won’t let you re-use the same ssh key for both accounts so you need 2 keys.
To make this work, you will need to do 2 more steps. in $
In this example, we have the secondary ssh key named id_rsa_corpo .
If you already cloned the repo for the secondary key, change the remote to point to github-corpo .
If not, then just clone by replacing the host :