Development environment on Windows
Run bash on Windows.
- Open PowerShell.
- Enable Windows Subsystem for Linux.
> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
- Install Ubuntu
Command line installer for Windows.
- Open PowerShell.
- Set the execution policy.
> set-executionpolicy remotesigned -s currentuser
- Install scoop.
> iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
- Add extras and versions buckets.
> scoop add bucket extras > scoop add bucket versions
Search for packages
> scoop search vim
Install a package
> scoop install vim
Text editor to speed up your typing.
- Open PowerShell.
- Install Vim.
> scoop install vim
Open vim in current directory.
> vim .
Open a file in vim
> vim ./my-file.txt
IDE to speed up your development.
- Open PowerShell.
- Install VS Code.
> scoop install vscode
Open current directory in VS Code.
> code .
Open file in VS Code.
> code ./my-file.txt
Version control.
- Open PowerShell.
- Install Git.
> scoop install git
Container management.
- Open PowerShell.
- Install Docker.
> scoop install docker
- Install docker-compose
> scoop install docker-compose
View running containers
> docker ps -a
View local images
> docker images
Pull image from DockerHub
> docker pull bash
Run a container
> docker run -it bash
Portable console emulator.
-
Open PowerShell.
-
Install cmder.
> scoop install cmder
-
Download Meslo font.
-
Right click on download font and click 'Install'.
-
Open cmder from start menu.
-
Open cmder settings using keyboard shortcut
Win-Alt-P
. -
Set the font.
-
Set the PowerShell task.
-
Set the Ubuntu task. Change the path to use your username.
-
Pin cmder to the task bar. If it is the first item then you can access it using the keyboard shortcut
Win-1
.
- cmder
- [Medium Perfect Windows Dev]( https://medium.com/@pranjalpaliwal/perfect-dev-environment-on-windows-the-easiest-way-691c649850eb
Better prompt.
-
Open cmder.
-
Open PowerShell profile.
> vim $PROFILE
-
Add posh-git and oh-my-posh.
Import-Module posh-git Import-Module oh-my-posh Set-Theme paradox
-
Open a new shell and view the result.
- posh-git
- oh-my-posh
- [Medium Perfect Windows Dev]( https://medium.com/@pranjalpaliwal/perfect-dev-environment-on-windows-the-easiest-way-691c649850eb
Easy to read, learn, use programming language.
> scoop install python
Check version.
> python --version
Run code in shell.
> python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> x = 1
>>> y = 2
>>> x + y
3
>>>
Python package management.
Install Pipenv.
> pip install --user pipenv
Open your PowerShell profile.
> vim $PROFILE
Add the following line.
$env:Path += ";C:\Users\<username>\AppData\Roaming\Python\Python37\Scripts"
Restart your shell and check the installation.
> pipenv
Usage: pipenv [OPTIONS] COMMAND [ARGS]...
Options:
--where Output project home information.
...
Web based Notebook/REPL.
conda install -c conda-forge jupyterlab
Start Jupyter
activate py3
jupyter lab
Install extension
jupyter labextension install jupyterlab_vim