How To Install And Use Linux Bash On Windows 10

how to set up windows 10
First up, you have to have a few things constantly in place before we can easily dig into your how-to. In order to use Bash, you need to be running Windows 10 using the Anniversary Update - specifically version 1607 or newer. You can determine your version by clicking the Windows menu, then type “About your PC.” Select the appropriate shortcut to check out the “Version” row.

We will likely start by installing the “Windows Subsystem for Linux” that can give us having access to Bash in Windows. With the Subsystem installed, it will be possible to run certain Linux executables without having to recompile them. However, this can not be employed by graphical programs. It’s really intended to help developers or tinkerers with command line utilities and programs.

Installing Bash



how to setup windows 10Let’s investigate further. First up, we need to setup the Windows Subsystem for Linux.

1. Click the Windows button and type “Update.” Select the replacement for “Check for Updates.”

2. In the Updates window, select “For Developers” on the left hand menu.

3. Click the “Developer mode” button (Figure 1). Note that whilst you will be able to fit apps from sources aside from the Windows Store they are going to still ought to be signed. It are going to be possible for you to set up malicious software, though the chances needs to be small.

4. Next, demand Control Panel and Programs. Select “Turn Windows Features On or Off.”

5. Click the “Windows Subsystem for Linux” (Figure 2). Reboot if prompted to take action.

  1. After you reboot, open the Windows button and type “bash.” Select the Bash button to open up a new window.


  2. You will likely be prompted to set up Ubuntu on Windows. Type “y” thus hitting Enter.


  3. After a short while, you will likely be prompted to produce a user name - you can utilize “root” if you’d like. Note that this can give you administrative rights within the Bash session. You can create some other user (and password) if desired.


Learning How to Crawl



If now is your first time using Bash or just about any LinuxUnix shell, please read on, otherwise if you’re already a professional, you'll already know what I’m going to cover. You can consider Figure 4 and follow along.

Finding Your Way



In this straightforward example, we’ll use Bash to navigate to some local directory on our computer. We can work with a few simple commands to navigate the file structure.

- pwd - aka “print working directory” - this may tell you the existing directory you're in

- cd - aka “change directory” - this can allow you to change directories

- ls - this may list the contents of the actual directory

Another important concept in Linux is mount points. Think of this as shortcuts to external devices. Since Bash on Windows doesn’t truly know about your Windows OS, it thinks about it as another system. You can access the local Windows drives underneath the /mnt “directory.”

Example Navigation



Using these information, we could use these commands to proceed to the C:Program Files directory. Type these as you go along.

- pwd - you may see we have been currently inside the /root directory

- cd .. - it will take us up a directory

- ls - you can observe all of the Linux directories present. Notice the /mnt directory - we’ll find Windows under there!

- cd /mnt

- ls - we could see my computer incorporates a c and f drive

- cd c - this takes us in the C: drive

- cd “Program Files” - this may take us to the Program Files directory. Note the application of quotes is essential because of the space between words.

A few what you should note - Linux and Unix systems are case sensitive. If I had typed “cd ‘program files’” within the last line, it could have errored out.

In addition, you'll be able to combine “cd” statements as an alternative to navigating one folder each time. For example, for the /root directory, I could have typed “cd ‘../mnt/c/Program Files’” to consider me right to the Program Files directory.

There’s much more to cover - it is possible to write Bash scripts to handle tasks within an automated fashion, use Vi or Nano to edit documents and install utilities utilizing the Ubuntu Apt commands. Let me know if you'll find any specific things you’d as i am to cover within the comments below!
Next Post Previous Post
No Comment
Add Comment
comment url