Overview of Windows Subsystem for Linux 2 (WSL)

 
COM 1008 AN OVERVIEW OF CLOUD
COMPUTING (NON-TECHNICAL)
 
Hans Yip
 
Learning Objectives
 
Microsoft Windows 10 – Windows Subsystem for Linux 2 (WSL) (lab)
 
 
 
 
 
The 
Windows Subsystem for Linux 2 (WSL)
 
The Windows Subsystem for Linux (WSL) is a 
new
Windows 10 
feature
 that enables you to 
run native Linux
command-line 
tools directly on Windows, alongside your
traditional Windows desktop and modern store apps.
See the 
about page
 for more details.
https://docs.microsoft.com/en-us/windows/wsl/faq
 
Who is WSL for?
 
This is primarily a tool 
for developers 
– especially web
developers and those who work on or with open source
projects.
This allows those who want/need to use Bash, common
Linux tools (sed, awk, etc…) and many Linux-first tools
(Ruby, Python, etc…) to use their toolchain on Windows.
 
What is Bash?
 
Bash
 (Bourne-Again SHell) is a popular text-based shell and
command-language.
It is the default shell included within Ubuntu and other Linux
distros, and in 
macOS
.
Users type commands into a shell to execute scripts and/or
run commands and tools to accomplish many tasks.
Shell
 is a 
command interpreter
. It translates commands from
Apps and send it to the Operation System (O/S) for
execution.
 
Take a closer look at the Linux Operating
System (O/S) again
 
Why Would I use WSL rather than Linux in a
VM?
 
WSL 
requires fewer resources 
(CPU, memory, and storage) than a
full virtual machine.
WSL also 
allows you to run Linux command-line 
tools and apps
alongside your Windows command-line, desktop and store apps,
and to 
access your Windows files from within Linux
.
This enables you to use Windows apps and Linux command-line
tools on the same set of files if you wish.
 
To Install Windows Subsystem for Linux 2 (WSL)
with Ubuntu 18.04 LTS
 
Before installing any Linux distros for WSL, you must 
ensure that
the "Windows Subsystem for Linux" optional feature is enabled
:
Start 
Window
, Click 
Settings
, Click 
Apps
Click 
Programs and Features 
(on the right-hand side)
Click 
Turns Windows features on or off 
(on the left-hand side)
Check 
Windows Subsystem for Linux
.
Restart
 the computer.
 
https://docs.microsoft.com/en-us/windows/wsl/install-win10
 
Check OS Build and System Type
 
Windows for Subsystem Linux 2 (WSL) requires your Windows
with 
O/S build 16215 or later
, and 
System type is 64-bit
.
To find your PC’s architecture and Windows build number, Open
Click 
Windows
, Click 
Settings
Click 
System
Click 
About 
(on the left-hand side bottom)
Look at the 
System type must be 64-bit
.
Look at the 
OS Build (bottom of the screen) must be > 16215
.
 
Install Ubuntu Linux Distribution
 
Open the Microsoft Store and choose Ubuntu 18.04 LTS
Ubuntu 18.04 LTS
 
(
follow this link
)
From the distro’s page, select “
Get
Now that your Linux distro is installed, you must 
initialize
your new distro instance
 once, before it can be used. (see
next page)
 
Initializing a Newly Installed Distro
 
https://docs.microsoft.com/en-us/windows/wsl/initialize-distro
  (See instructions here)
Launch a Distro
:
Click 
Windows
, Click 
Microsoft Store 
app, Click “
Launch
The first time a newly installed distro runs, a 
Console window will open
, and you'll be 
asked to wait
for a minute or two 
for the installation to complete.
During this final stage of installation, the distro's files are de-compressed and stored on your PC,
ready for use. This may take around a minute or more depending on the performance of your PC's
storage devices. 
This initial installation phase is only required when a distro is clean-installed 
- all
future launches should take less than a second.
Setting up a new Linux user account
:
Once installation is complete, you will be 
prompted to create a new user account (and its password).
This user account is for the normal 
non-admin user 
that you'll be logged-in as by default when
launching a distro.
 
To Launch Ubuntu 1804
 
Type 
ubuntu1804 
on the command-line prompt (
cmd.exe
)
OR 
click
 on the 
Ubuntu tile
 in the 
Start Menu
To find out the ubuntu version from the command-line
prompt, enter 
lsb_release –a
To find out kernel name: 
uname –s
To find out kernel release: 
uname –r
To find out kernel version: 
uname –v
To exit Linux, type 
exit
 
Update and Upgrade your Distro’s Package
 
It is strongly recommend 
regularly updating your package 
catalog,
and 
upgrading your installed packages 
using your distro's preferred
package manager.
On Ubuntu, you use 
apt
:
From the 
Ubuntu command line
, enter: (you may need to use the
password that you created during 
initializing process
)
 
sudo apt update && sudo apt upgrade
 
References
 
https://www.computerhope.com/issues/ch001879.htm
https://docs.microsoft.com/en-us/windows/wsl/about
 
 
Slide Note
Embed
Share

Windows Subsystem for Linux 2 (WSL) is a new feature in Windows 10 that allows users to run native Linux command-line tools directly on Windows alongside traditional desktop and store apps. It is primarily geared towards developers, especially web developers and those working with open-source projects, enabling them to use Bash, common Linux tools, and Linux-first tools on Windows. WSL requires fewer resources than a full virtual machine and provides seamless integration between Windows and Linux environments.

  • Windows Subsystem for Linux
  • WSL 2
  • Linux command-line tools
  • Windows 10
  • Developers

Uploaded on Oct 08, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. COM 1008 AN OVERVIEW OF CLOUD COMPUTING (NON-TECHNICAL) Hans Yip

  2. Learning Objectives Microsoft Windows 10 Windows Subsystem for Linux 2 (WSL) (lab)

  3. The Windows Subsystem for Linux 2 (WSL) The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps. See the about page for more details. https://docs.microsoft.com/en-us/windows/wsl/faq

  4. Who is WSL for? This is primarily a tool for developers especially web developers and those who work on or with open source projects. This allows those who want/need to use Bash, common Linux tools (sed, awk, etc ) and many Linux-first tools (Ruby, Python, etc ) to use their toolchain on Windows.

  5. What is Bash? Bash (Bourne-Again SHell) is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distros, and in macOS. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks. Shell is a command interpreter. It translates commands from Apps and send it to the Operation System (O/S) for execution.

  6. Take a closer look at the Linux Operating System (O/S) again Applications/Users Shell [Bourne (sh), Korn (ksh), C shell (csh), Bourne-Again Shell (bash)] Operating System (O/S) Hardware

  7. Why Would I use WSL rather than Linux in a VM? WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine. WSL also allows you to run Linux command-line tools and apps alongside your Windows command-line, desktop and store apps, and to access your Windows files from within Linux. This enables you to use Windows apps and Linux command-line tools on the same set of files if you wish.

  8. To Install Windows Subsystem for Linux 2 (WSL) with Ubuntu 18.04 LTS Before installing any Linux distros for WSL, you must ensure that the "Windows Subsystem for Linux" optional feature is enabled: Start Window, Click Settings, Click Apps Click Programs and Features (on the right-hand side) Click Turns Windows features on or off (on the left-hand side) Check Windows Subsystem for Linux. Restart the computer. https://docs.microsoft.com/en-us/windows/wsl/install-win10

  9. Check OS Build and System Type Windows for Subsystem Linux 2 (WSL) requires your Windows with O/S build 16215 or later, and System type is 64-bit. To find your PC s architecture and Windows build number, Open Click Windows, Click Settings Click System Click About (on the left-hand side bottom) Look at the System type must be 64-bit. Look at the OS Build (bottom of the screen) must be > 16215.

  10. Install Ubuntu Linux Distribution Open the Microsoft Store and choose Ubuntu 18.04 LTS Ubuntu 18.04 LTS (follow this link) From the distro s page, select Get Now that your Linux distro is installed, you must initialize your new distro instance once, before it can be used. (see next page)

  11. Initializing a Newly Installed Distro https://docs.microsoft.com/en-us/windows/wsl/initialize-distro (See instructions here) Launch a Distro: Click Windows, Click Microsoft Store app, Click Launch The first time a newly installed distro runs, a Console window will open, and you'll be asked to wait for a minute or two for the installation to complete. During this final stage of installation, the distro's files are de-compressed and stored on your PC, ready for use. This may take around a minute or more depending on the performance of your PC's storage devices. This initial installation phase is only required when a distro is clean-installed - all future launches should take less than a second. Setting up a new Linux user account: Once installation is complete, you will be prompted to create a new user account (and its password). This user account is for the normal non-admin user that you'll be logged-in as by default when launching a distro.

  12. To Launch Ubuntu 1804 Type ubuntu1804 on the command-line prompt (cmd.exe) OR click on the Ubuntu tile in the Start Menu To find out the ubuntu version from the command-line prompt, enter lsb_release a To find out kernel name: uname s To find out kernel release: uname r To find out kernel version: uname v To exit Linux, type exit

  13. Update and Upgrade your Distros Package It is strongly recommend regularly updating your package catalog, and upgrading your installed packages using your distro's preferred package manager. On Ubuntu, you use apt: From the Ubuntu command line, enter: (you may need to use the password that you created during initializing process) sudo apt update && sudo apt upgrade

  14. References https://www.computerhope.com/issues/ch001879.htm https://docs.microsoft.com/en-us/windows/wsl/about

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#