Linux within Windows 10
Whether you are a Linux/ Unix user, don't find Windows friendly or want to run simple clever stuff in bash shell that Windows shell simply cannot handle, you'll love it.
Windows 10 has built in Windows subsystem for Linux delivering native support for Linux features. This is not a virtual machine running in any hypervisor program, no Hyper-V, VMWare Workstation or Oracle Virtualbox required.
Because it works natively you also have access to windows drives and directories which is very useful if you want to run any scripts or even grep or awk type commands on files in your windows directories.
So how do you do it? It is very simple and here are the steps you have to carry out.
- Press Windows+R and enter "OptionalFeatures" in Open box and click OK to run.
- From Windows Features form select "Windows Subsystem for Linux" and hit OK.
- Wait for it to find required files and complete installation.
- Select Restart and wait for it to finish installation which didn't take long for me.
- Now heat towards Microsoft Store in programs.
- Search for Linux and select Ubuntu or "Run Linux on Windows" from suggestions.
- This will give you choice of 5 distributions, where I selected Ubuntu as my favourite.
- Click Get and it is Free, I did not sign into Microsoft to use across all my devices.
- After download of <300MB is finished click Launch.
- This will take few minutes to install Linux binaries and will offer you to create user.
- Enter a username and password. (Never use blank or easy passwords)
- You are ready to go and crack on.
- Don't forget to pin it to taskbar, or search for bash, or enter "bash" after Windows+R.
- It is likely to take you to your Windows directory but if it doesn't you can edit /etc/passwd using your favourite editor e.g. "vi /etc/passwd" and change your home directory from /home/username to "/mnt/c/Users/Username" against your username as per below.