Windows Subsystem for Linux (WSL)
Proper Linux environment on Windows.
- Windows Subsystem for Linux (WSL)
-
Linux binaries can run in it.
-
Real bash shell with real Linux command-line utilities.
- To install:
- Windows - Search for "Turn Windows Features On Or Off" - Enable "Windows Subsystem for Linux"
- Start - Microsoft Store - search for "Linux" - install whatever Linux distribution you want, e.g. Ubuntu
- Gives command-line with Linux commands.
- Linux files are under root dir /
- Home directory: /home/userid
Linux and Windows files
- Can we modify Windows files with Linux tools?
- Yes.
Windows files are under drive letters like: /mnt/c
- You can edit them with Linux tools, just like any normal Linux files.
- Can we modify Linux files with Windows tools?
Scripting may be slow
- A warning however.
If you use Linux scripts to process Windows files, they run slow.
-
One-off access is fine. You will not notice.
But accessing many files in a loop can run very slow.
Can be
hundreds of times slower than normal Linux.
- The problem is Linux reading Windows file system. This is inherently slow
- Comparing WSL 1 and WSL 2.
Advice is to copy/move files to Linux filesystem. Then scripts are fast.
GUI
Windows 10 running Ubuntu and Xming.
wget on command-line
gedit in GUI
Still have Windows desktop.
See
full size.
root access
- You have root access
- You can use package mangers like
apt
to update applications
- sudo apt update
- sudo apt install gedit