Install developer tools on Windows Subsystem for Linux

From JMK Wiki
Jump to navigation Jump to search

Install git and maven

Install git and maven:

root@localhost ~ # apt install git maven

Verify git and mvn version:

user@localhost ~ $ git --version
user@localhost ~ $ mvn -v

Include the git branch name in the PS1 prompt

Note: based on

Create and edit the /usr/local/bin/ file:

root@localhost ~ # nano -w /usr/local/bin/
#!/usr/bin/env bash

parse_git_branch() {
    git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'

Edit the ~/.bashrc file of the user and add the following lines:

user@localhost ~ $ nano -w ~/.bashrc
source /usr/local/bin/
export PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w\[\033[01;33m\]\$(parse_git_branch) \[\033[01;34m\]\$\[\033[00m\] "

Reload the ~/.bashrc file

user@localhost ~ $ source ~/.bashrc

For more git prompt manipulation see and

Install AWS CLI

While AWS CLI can be installed from the Debian repository it is an outdated version and it is better to install via pip (the python package manager).

AWS CLI help also requires groff-base:

root@localhost ~ # apt install python-pip groff-base

Install AWS CLI:

root@localhost ~ # pip install awscli

Verify AWS CLI version:

user@localhost ~ $ aws --version

Continue with Installing Docker on Windows Subsystem for Linux