How to Install Ubuntu on Windows 10 (WSL)

ProgrammingKnowledge2
8 Jun 202011:40

Summary

TLDRThis tutorial guides viewers through enabling the Windows Subsystem for Linux (WSL) on Windows 10, starting with accessing the Control Panel and navigating to 'Turn Windows features on or off.' It details the installation of WSL and a Linux distribution like Ubuntu from the Microsoft Store. The video further demonstrates how to use the Ubuntu terminal, create and edit files, and navigate Windows file systems from the Linux environment. It concludes by showing how to access the WSL through the Command Prompt, offering a seamless way to run Linux commands on Windows.

Takeaways

  • πŸ”§ To enable the Windows Subsystem for Linux, open the Control Panel and navigate to 'Programs and Features'.
  • πŸ–₯️ Search for and enable 'Windows Subsystem for Linux' within the 'Turn Windows features on or off' section.
  • πŸ”„ After enabling the feature, a system reboot is required to apply the changes.
  • πŸ’» Use the Command Prompt to check if the Linux subsystem is installed by typing 'bash'.
  • πŸ› οΈ If no Linux distribution is found, you can install one from the Microsoft Store or by using a provided URL.
  • πŸ” Search for a Linux distribution like Ubuntu in the Microsoft Store and install it.
  • πŸ“ During the first launch of the Linux distribution, you'll be prompted to set a new Unix username and password.
  • πŸ—‚οΈ The Windows drives are accessible within the Linux subsystem under the '/mnt' directory.
  • πŸ“ You can navigate to Windows directories from the Linux terminal, just like you would in a native Linux environment.
  • πŸ’Ύ Demonstrated file operations such as creating, editing, and viewing files within the Linux subsystem.
  • πŸ”€ You can also access the Linux subsystem directly from the Windows Command Prompt by typing 'bash'.

Q & A

  • How do you access the Control Panel on Windows?

    -You can access the Control Panel by searching for it in the search box and clicking on the Control Panel result.

  • What is the first step to enable the Windows Subsystem for Linux?

    -The first step is to open the Control Panel, navigate to the 'Programs' option, and then click on 'Programs and Features'.

  • How do you enable the Windows Subsystem for Linux?

    -You need to click on 'Turn Windows features on or off' within the 'Programs and Features' window, scroll down, and check the box for 'Windows Subsystem for Linux'.

  • What happens after enabling the Windows Subsystem for Linux?

    -After enabling the Windows Subsystem for Linux, you need to restart your computer for the changes to take effect.

  • How do you check if the Windows Subsystem for Linux is installed?

    -You can check by opening the Command Prompt and typing 'bash'. If the subsystem is installed, you will see an output indicating that no Linux distribution is currently installed.

  • Where can you get a Linux distribution for Windows Subsystem for Linux?

    -You can get a Linux distribution from the Microsoft Store by searching for 'Linux' and selecting the desired distribution, such as Ubuntu.

  • What is the initial setup process like when you first launch a Linux distribution on Windows?

    -The initial setup process involves installation, which is a one-time event. After installation, you may be prompted to set a new Unix username and password.

  • How can you access your Windows drives from the Ubuntu terminal?

    -You can access your Windows drives by navigating to the mount point in Ubuntu, which is typically represented by '/mnt/' followed by the drive letter.

  • How do you create a new file in the Ubuntu terminal on Windows?

    -You can create a new file using the 'touch' command followed by the filename, for example, 'touch test.txt'.

  • What is the default text editor in Ubuntu and how do you use it?

    -The default text editor in Ubuntu is 'nano'. You can use it by typing 'nano filename' to open or create a file, make changes, and then exit by pressing Ctrl+X, confirming with 'Y', and pressing Enter.

  • How can you run Linux commands on Windows Command Prompt?

    -You can run Linux commands on the Windows Command Prompt by typing 'bash' and then entering the desired Linux commands.

Outlines

00:00

πŸ’» Installing Windows Subsystem for Linux (WSL)

The paragraph provides a step-by-step guide on how to install the Windows Subsystem for Linux (WSL) on a Windows 10 operating system. It starts with opening the Control Panel and navigating to 'Programs and Features'. From there, the user is instructed to enable the 'Windows Subsystem for Linux' feature. After enabling the feature, a system reboot is required. Post-reboot, the user is guided to open the Command Prompt, type 'bash', and press enter to check if WSL is installed. If not, the user is directed to either use a provided URL or the Microsoft Store to download and install a Linux distribution, such as Ubuntu. The paragraph concludes with the user launching the Ubuntu terminal and adjusting the font size.

05:01

πŸ–₯️ Navigating and Using Ubuntu in Windows

This paragraph details the initial setup and usage of the Ubuntu terminal on Windows 10, following the installation of a Linux distribution via WSL. It covers the first-time setup, including creating a new Unix username and password. The paragraph then demonstrates how to navigate the Ubuntu file system, including accessing files and directories on the Windows operating system. It shows how to use commands like 'ls', 'pwd', and 'cd' to explore the file system and create new files. Additionally, it explains how to create a new text file using the 'touch' command and edit it using 'nano', and how to view its contents with 'cat'. The paragraph also highlights the ability to use the Windows Command Prompt to run Linux commands.

10:02

πŸ“ Editing Files in Ubuntu and Using Windows Command Prompt

The final paragraph demonstrates how to edit a text file in the Ubuntu terminal using the 'nano' text editor. It shows the process of writing content to a file, exiting the editor, and then verifying the content with the 'cat' command. The paragraph also illustrates how to use the Windows Command Prompt to access the Ubuntu environment by typing 'bash' and pressing enter. This allows users to run Linux commands directly from the Windows Command Prompt, showcasing the integration of WSL with the Windows 10 operating system. The video concludes with a sign-off, indicating the end of the tutorial.

Mindmap

Keywords

πŸ’‘Control Panel

The Control Panel is a key component of Windows operating systems that allows users to access various system settings and configurations. In the video, it is the starting point for enabling the Windows Subsystem for Linux (WSL), which is essential for running Linux environments on Windows. The script instructs viewers to open the Control Panel to access the 'Programs and Features' section, where they can then enable WSL.

πŸ’‘Programs and Features

This is a section within the Windows Control Panel that lists all the installed programs on a system, allowing users to uninstall or change them. The video script guides users to navigate to 'Programs and Features' to access the 'Turn Windows features on or off' option, which is necessary for enabling the Windows Subsystem for Linux.

πŸ’‘Windows Subsystem for Linux (WSL)

WSL is a compatibility layer for running Linux binary executables natively on Windows 10 and later versions. The video's main theme revolves around enabling WSL, which allows users to install and use Linux distributions on Windows without virtualization or dual-booting. The script describes the process of enabling this feature through the Control Panel.

πŸ’‘Ubuntu

Ubuntu is a popular Linux distribution known for its user-friendliness and strong community support. In the context of the video, Ubuntu is chosen as the Linux distribution to be installed via the Microsoft Store, showcasing how Windows 10 integrates with Linux environments through WSL.

πŸ’‘Microsoft Store

The Microsoft Store is a digital distribution platform for Windows, where users can download and install applications, including Linux distributions like Ubuntu. The video demonstrates how to search for and install Ubuntu from the Microsoft Store, highlighting the ease of accessing Linux distributions on Windows.

πŸ’‘Command Prompt

The Command Prompt is a command-line interface on Windows that allows users to execute commands directly. The video uses the Command Prompt to run 'bash', which activates the WSL environment, demonstrating the seamless integration of Linux commands within Windows.

πŸ’‘Linux Distribution

A Linux distribution is a version of the Linux operating system that includes the Linux kernel and a collection of software packages. The video mentions various distributions such as Ubuntu, Kali Linux, and Debian, emphasizing the choice available to users when installing Linux via WSL.

πŸ’‘BASH

BASH is a command language interpreter, or 'shell', used in Unix-like operating systems like Linux. The video instructs viewers to type 'bash' in the Command Prompt to launch the WSL environment, indicating the use of BASH to interact with the Linux distribution installed on Windows.

πŸ’‘Mount

In the context of operating systems, 'mounting' refers to the process of making a storage device's file system available for use. The script explains that Windows drives are 'mounted' in the Linux environment within WSL, allowing users to access their Windows files from the Linux command line.

πŸ’‘File System Navigation

The video demonstrates how to navigate the file system within the Ubuntu terminal, using commands such as 'cd' (change directory), 'ls' (list directory contents), and 'pwd' (print working directory). This shows how users can manage and access files across their Windows and Linux environments.

πŸ’‘Nano

Nano is a text editor commonly found on Unix-like systems, including Linux distributions. The video script includes an example of using 'nano' to create and edit a text file within the Ubuntu terminal on Windows, illustrating the functionality of text editing in the WSL environment.

Highlights

Open Control Panel to access system settings.

Navigate to Programs and Features to manage software.

Enable Windows Subsystem for Linux to run Linux on Windows.

Restart the system to apply changes.

Use Command Prompt to check for Linux subsystem installation.

Access the Windows Store to download a Linux distribution.

Choose a Linux distribution like Ubuntu from the Microsoft Store.

Install and set up the chosen Linux distribution.

Launch Ubuntu from the Start menu or Recently Added items.

Adjust font size in the Ubuntu terminal for better readability.

Set up a new Unix username and password for the Linux subsystem.

Explore common files and directories in the Ubuntu environment.

Navigate to Windows drives from the Ubuntu terminal.

Access the C: drive and other directories using Ubuntu commands.

Create and edit files in the Windows file system using Linux commands.

Use the touch command to create new files in the Ubuntu terminal.

Edit files with nano and view content with cat command.

Switch between Windows Command Prompt and Ubuntu bash.

Run Linux commands directly from the Windows Command Prompt.

Demonstration of a complete workflow for using Linux on Windows.

Transcripts

play00:00

so first of all what you need to do is

play00:02

you just need to open your

play00:04

control panel so just uh search for

play00:06

control panel in your search box

play00:09

and then just click on control panel

play00:11

here

play00:12

and once the control panel window opens

play00:14

you just need to click on

play00:16

programs option here and then click on

play00:19

programs and features and once this

play00:23

window opens you just need to click on

play00:26

turn windows feature on or

play00:28

off okay so just click on turn windows

play00:31

feature

play00:32

on or off this window you can also

play00:35

see when you type here turn a windows

play00:38

feature on or off directly

play00:40

okay so i'm going to just write turn

play00:44

windows feature on or off and when you

play00:47

click on this

play00:48

result you will see similar kind of

play00:50

windows so you can either

play00:52

just type turn windows feature on or off

play00:55

or you can go uh to this window

play00:58

by a control panel right so just scroll

play01:02

down

play01:03

on this window and then click on this

play01:06

option which says

play01:07

windows subsystem for linux okay so just

play01:11

check this checkbox and then click on ok

play01:14

and once you click on ok it's going to

play01:17

search for

play01:18

the tools it's going to apply all the

play01:20

changes

play01:21

and once everything is done it says

play01:24

windows completed the

play01:26

requested changes and then we need to

play01:28

reboot our system

play01:30

so you can just click on restart now

play01:33

option or you can

play01:34

manually restart your windows operating

play01:37

system

play01:38

i'm going to just say restart now which

play01:40

is going to restart

play01:42

my windows operating system so once your

play01:45

windows 10 operating system restarts

play01:48

what you need to do is you can just go

play01:51

to your

play01:51

search bar and search for cmd and then

play01:55

choose this result which says command

play01:57

prompt and then here you can just write

play01:59

bash and then press enter which is going

play02:02

to

play02:03

give you this kind of output so this

play02:06

means

play02:07

that windows subsystem for linux has no

play02:10

installed

play02:10

distribution and you can just

play02:14

search for this using the windows stores

play02:18

so what you can do is you can just copy

play02:20

this url from here

play02:22

and then open this url in your

play02:25

browser so this is one way of doing it

play02:28

but

play02:29

if you don't want to do this you can do

play02:31

this by just

play02:32

going to the microsoft store also so

play02:35

just click on windows icon here and then

play02:38

just choose microsoft store here

play02:42

and once the microsoft store opens you

play02:44

just need to

play02:45

search for let's say whatever linux

play02:48

system

play02:49

you want to search here you can just

play02:52

write

play02:53

linux here and then search for linux

play02:57

systems you can see so many linux

play03:00

operating systems

play03:01

available here what i'm going to choose

play03:04

is i'm going to choose the

play03:06

ubuntu option here you can also choose

play03:08

let's say

play03:10

kali linux or ubuntu 18.4

play03:13

lts version or suse linux

play03:17

debian and many other linux operating

play03:20

system

play03:20

so i'm going to choose ubuntu here

play03:25

and then you can just click on get

play03:29

and then if you have your microsoft

play03:31

account you can

play03:32

just sign in with your microsoft account

play03:35

or you can just say no

play03:36

thanks and then you will see the

play03:39

download and install

play03:40

of this ubuntu will start

play03:43

on our windows operating system so just

play03:47

wait for this process to complete this

play03:49

download and install

play03:50

of this ubuntu on our windows operating

play03:53

system so i will just fast forward

play03:56

this process of download and install of

play03:58

ubuntu so now i can see

play04:01

that this product is installed so i can

play04:03

launch this ubuntu

play04:05

by just clicking this button but if

play04:07

accidentally

play04:08

if you close this window you can also

play04:11

open

play04:12

ubuntu by just clicking on your windows

play04:15

icon and you will be able to see

play04:17

ubuntu here in recently added items

play04:20

so i'm going to just click on ubuntu

play04:23

here

play04:24

and it's going to start this ubuntu

play04:28

terminal this is not the windows 10

play04:31

command prompt it's a

play04:32

ubuntu terminal okay so this is the

play04:36

windows command prompt which i'm going

play04:37

to close and this is the ubuntu terminal

play04:41

now if you want to just increase the

play04:43

font size

play04:44

you can just click on this ubuntu icon

play04:47

here and then click on properties

play04:50

and let's choose 20 here or 24

play04:54

as the font size so you can see

play04:57

this installation process so this is

play05:00

one time installation process which is

play05:03

going to take place

play05:04

when you start your ubuntu app

play05:07

on your windows 10 operating system for

play05:10

the first time so i will wait for this

play05:12

installation

play05:13

and after some time when you press enter

play05:16

you will see uh

play05:17

this kind of prompt which says

play05:20

enter new unix username

play05:23

so here you can give any username to

play05:26

your

play05:27

new unix system i'm going to

play05:30

give here code bind as the username for

play05:33

example

play05:34

and then you just need to give any

play05:37

password

play05:38

to your unix operating system so this

play05:40

password and username should not be

play05:43

uh the windows username and password

play05:45

this can be any username and password

play05:47

which you want to give here so i'm going

play05:49

to give a password here and repeat the

play05:52

password

play05:54

and then press enter and it says

play05:56

password updated successfully

play05:59

so now i can see uh this kind of command

play06:02

prompt and here

play06:03

i'm going to just do ls uh

play06:07

hyphen al and i can see

play06:10

uh this kind of output here so all these

play06:14

bash underscore log out file is there

play06:16

bash rc is there

play06:18

these are the files which you commonly

play06:20

see in your

play06:22

debian or ubuntu operating system let's

play06:25

give a pwd command which is

play06:27

current working directory command and

play06:30

you can see it

play06:31

gives us home forward slash your

play06:33

username so whatever username you have

play06:35

given here

play06:36

will be uh printed here after home

play06:40

so now you might be wondering how will

play06:44

i navigate to my c drive or

play06:47

e drive in my windows operating system

play06:51

using this command prompt on

play06:53

ubuntu so the c drive

play06:56

or other drives are mounted on

play06:59

your ubuntu operating system

play07:02

so here you can just write ls

play07:06

and then forward slash m

play07:09

and t for mount and then forward slash

play07:12

and press enter

play07:13

and you will see all the drives which

play07:16

are

play07:16

present on your windows operating system

play07:20

so right now i can see uh c drive and f

play07:22

drive

play07:23

which are printed here which is exactly

play07:25

the same which i have on my windows

play07:28

operating system so when i go to this pc

play07:30

i have c drive and f drive here and

play07:34

these are the drive names which are

play07:36

printed here

play07:37

now if i want to go to the c drive then

play07:40

i can

play07:41

simply write cd command for that so i

play07:43

can just write cd

play07:45

forward slash m and t

play07:48

forward slash c so i want to go into my

play07:51

c directory so i will just write c

play07:53

here and now i can see uh

play07:56

that am in my c uh directory which is

play07:59

windows c directory so let me clear

play08:03

this uh terminal and we are going to

play08:06

move forward so now i'm going to once

play08:08

again

play08:09

write ls hyphen a l

play08:13

and you will see all the files and

play08:15

folders

play08:16

which are present in my c

play08:19

directory so when i go to my c directory

play08:23

you can see ffmpeg program files program

play08:26

files x86 users

play08:28

windows all the same files and folders i

play08:32

will see here

play08:33

so let's say i want to go to my desktop

play08:35

i will just

play08:36

go to here so cd and then

play08:40

write users and then press enter

play08:43

and once again i will do ls hyphen al

play08:47

and then i will go to the username

play08:51

so so my windows username is cb so i

play08:54

will just

play08:54

cd to the cb folder so cb

play08:58

and then i will once again do ls minus

play09:01

al here

play09:03

and i will see all the files and folders

play09:06

which are present

play09:07

in my uh user directory so

play09:10

here i want to navigate to the desktop

play09:14

so i will once again clear the terminals

play09:18

and then i will just cd to my

play09:22

desktop directory and here let's

play09:25

create some file using the

play09:29

unix command okay so i'm going to just

play09:32

write

play09:33

touch here and let me show you my

play09:36

desktop also at the same time so i'm

play09:38

going to just give

play09:39

touch command on my ubuntu terminal and

play09:42

then

play09:42

name my file anything for example test

play09:46

dot txt file and then press enter

play09:49

and once i do that you can see this

play09:51

test.txt file is created

play09:54

then i can also uh write for example

play09:57

nano which is the default

play09:59

terminal on your ubuntu operating system

play10:02

and then

play10:03

the text.txt which is going to open this

play10:06

file in the nano terminal

play10:08

and then i'm going to just write test

play10:12

and let me move this little bit up so

play10:14

you can see all these

play10:15

things and then i'm going to just press

play10:18

ctrl

play10:19

x here and then i'm going to just type

play10:22

y here and then press enter which will

play10:25

uh

play10:26

get me out of this nano terminal and

play10:28

then i'm going to just

play10:29

print the content inside this test.txt

play10:33

file using cat command so cat test.txt

play10:38

and you can see it prints whatever i

play10:40

have written inside

play10:41

my test.txt file using the nano

play10:44

terminal also you can open your bash

play10:48

terminal now

play10:49

using the windows command prompt so you

play10:51

can

play10:52

just search for a cmd here and then

play10:55

click on the command prompt here and

play10:58

once your command prompt opens you just

play11:00

need to write

play11:01

bash here and then press enter which is

play11:04

going to give you the same

play11:05

command prompt as you see in the

play11:08

ubuntu terminal okay so from here also

play11:12

you can

play11:13

give your ubuntu bash commands

play11:17

and work with the linux command

play11:20

using your windows command prompt so

play11:23

this is how

play11:24

you can run your linux or bash command

play11:27

on

play11:28

your windows 10 operating system using

play11:31

the built-in windows subsystem for

play11:35

linux i hope you've enjoyed this video

play11:38

and i will see you

play11:38

in the next video

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
WSL TutorialLinux on WindowsUbuntu InstallWindows 10Subsystem for LinuxCommand PromptFile AccessBash CommandsUbuntu TerminalWindows Integration