Skip to content

How to set up an Ubuntu Enviroment on Windows 10

Notifications You must be signed in to change notification settings

msaio/wsl_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSL_allInOne

This is a fully step-by-step guide comes with installation file from my original repository

sample.png

1. Requirements:

WSL 1: Windows Build 16215 or later.

WSL 2: Windows Builds 18917 or higher. (Updated May 14th 2020, WSL 2 is not offically published so you need to join Insider to enable the features).

You can check your Windows version from powershell with command like this:

systeminfo | Select-String "^OS Name","^OS Version"

In my opinion, you should update the windows to the latest, this helps alot.

2. Installation:

Step 1:

WSL 1: open powershell as administrator then type:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
WSL 2: Do the same thing as WSL 1 but add one more: ( MAKE SURE YOU ARE ALREADY IN INSIDER PROGRAM ).
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Step 2:

WSL 1:

Open Microsoft Store and search for keyword "WSL". You can download Ubuntu16, Ubuntu18, Ubuntu20,... Up to you. After downloading, a ternimal will pop-ups, enter your username and password. Then done.

WSL 2: You need to change WSL to version 2 or the system will install WSL 1 as default.

Open Powershell or CMD and type:

wsl --set-default-version 2
* NOTE: Of course, you can run both WSL 1 and WSL 2 on your machine.

Then do the same thing as WSL 1 and done.

Step 3: This is my personal setup. I have made it easier just in a single file. All you have to do is download the *set_up.sh and run:

./set_up.sh
* NOTE: If you got permission denied error, run this:
chmod +x set_up.sh

3. Explaination:

what is going on in my set_up.sh:

I. First of all:

We are going to update and upgrade to the latest.

Then to set up GIT ( in this set up, i am going with github.com, i will update with more options ).

You have to add your username, email and go to github, manually add ssh key then check the connection.

OR just skip my GIT set-up

I will add more options in future like GPG keys instead or many reposities like heroku, bitbucket, gitlab, ...

II. Secondly, We will set up editor.

In this installation, i am gonna set up with my personal configuration and also with plugins.

I'm kind of in love with neovim at the moment but i will definitely try other editors and add more options in future.

One more things, you can install vscode in Windows and call it from WSL. Microsoft has done a wonderful this for developers.

III. On the third, I give you 2 most famous shell: BASH and ZSH.

In this installation, there are:

Bash-it from github.com/Bash-it/bash-it

OhMyZSH from github.com/ohmyzsh/ohmyzsh

I prefer Bash-it because i did more personal config in .bashrc file than in .zshrc .

IV. You can run Linux GUI program from WSL and also with sound.

WSL need X-server for GUI. Check this link for detailed discussion about GUI on WSL 2: Link

Audio is not supported at the moment but can be handle with pulseaudio. Check this out: Link

*NOTE: with bash-it setup, i write some commands:
  • This will give you some option to choose ip ( in my case is opt 4, it works perfectly for me )
set_up_ip
  • Run xming as default
open_xserver
  • Run x-launch with config+file. If config_file does not exist, a pane will popups.
open_xserver config_file
  • Run pulseaudio. Click any keys to return.
open_pulseaudio
  • Kill x-server process from cmd
kill_xserver
  • Kill pulseaudio from cmd
kill_pulseaudio
  • Check if x-server or puslseaudio is running
check_xserver
check_pulseaudio

V. Last but not least, the powerful tmux.

I prefer OhMyTmux from: github.com/gpakosz/.tmux

--------------------------------------

There is currently only 2 set-up files for 2 versions 18.04 and 20.04.

The difference is not huge so, pretty much they are the same thing.

Detail explanation inside those files, check them out for more information.

I hope you enjoy it,

I will update more in future.

About

How to set up an Ubuntu Enviroment on Windows 10

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published