Download Bash For Mac

Install

The Brave browser is a fast, private and secure web browser for PC, Mac and mobile. Download now to enjoy a faster ad-free browsing experience that saves data and battery life by blocking tracking software. Teletype for Atom. Great things happen when developers work together—from teaching and sharing knowledge to building better software. Teletype for Atom makes collaborating on code just as easy as it is to code alone, right from your editor. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications. Installing Linux on a Mac. Yes, there is an option to run Linux temporarily on a Mac through the virtual box but if you’re looking for a permanent solution, you might want to completely replace the present operating system with a Linux distro. To install Linux on a Mac, you’ll need a formatted USB drive with storage up to 8GB.

Bash is the command-line interface for Linux distributions like Ubuntu, CentOS, Debian, Mint, Kali, RedHat, Fedora, etc. Bash provides a lot of different types of commands and tools to manage a Linux system. In this tutorial, we will learn how to install Bash on a Windows operating system like Windows 10.

What Is Bash?

Bash is the most popular shell or command line used in Linux distributions. Bash alternatives are Sh, KornShell, CShell, etc. Bash is the short form of the GNU Bourne-Again Shell and created in 1989 by the GNU supporter Free Software Foundation (FSF).

Windows Subsystem for Linux (WSL)

Containers are a new era of Virtualization where provides less resource usage and less complexity. Containers provide isolated environments for applications, processes, files, etc like a virtual system. Docker is the most known and popular containerization system. Windows also started full and complete container usage on Windows for Linux. It is called Windows Subsystem for Linux (WSL). This means the Linux operating system calls and standards are provided as a container on a Windows operating system. WSL is currently supported by the modern Windows operating systems like Windows 10 and Windows Server 2016 and 2019.

Bash Installation

In order to install Bash on Windows, we will enable the WSL and download a Linux container image like Ubuntu, SUSE, etc from Microsoft store. Then we will run this container from the Windows command line MS-DOS or PowerShell.

Enable Windows Subsystem For Linux

First, we will enable or install Windows Subsystem For Linux (WSL) with the PowerShell. We need Administrative features enabled by running PowerShell from Start Menu where we will right-click and then select Run as administrator.

We will run the following Enable-WindowsOptionalFeaturecommand in order to install and enable Microsoft-Windows-Subsystem-Linux feature.

We will be asked is we want to restart the computer after the installation is complete. We will answer Y.

This will restart the system automatically in order to start the Windows with the WSL enabled.

Download Linux Image/Distributions From Windows Store

In order to run bash, we have to download a Linux image/distributions which will provide the bash shell. Linux distributions can be downloaded from the Microsoft Store like below. We can access Microsoft Store from start menu with Microsoft Store keyword.

We will write linux to the search box and search. Alternatively, if we are looking for a specific Linux

The search results for the Linux container will be listed below. We can see that Linux distributions like Kali, Ubuntu, Debian, Suse, etc. The following information also provided with the search results.

  • Popularity provides the count of the rating provided the given Linux distribution image.
  • Rating is the provided points or starts for the given Linux distribution.
  • Supported Systems shows which environments can run given Linux image like Computer, Phone, etc.
  • Price is generally zero but used to show the price of the given Linux image.

We will select the Linux distribution like Kali, Ubuntu, Debian, SUSE like below just click them. In this example, we will select the Ubuntu image with the latest version. Ubuntu 18.04 LTS can be downloaded for Lon Term Support.

During the download, the download status will be shown in the header like below. We can see that the Ubuntu image is about 221 MB and downloaded very fast.

Download Bash For Mac

Launch Bash From Microsoft Store

When the download is complete we can launch Ubuntu container from the Microsoft Store from the Launch button like below.

We will see the following bash shell where it is initialized for the first run. As it says it may take a few minutes to see the shell.

Before starting to use bash we will be asked some basic questions like the username and password which will set. In this example, we set the username ismail. The password is not shown for security reasons. We see that the hostname part of the bash shell is the name of the computer which is DESKTOP-HQVAMA3 and the user name is ismail.

Start Bash From MS-DOS and PowerShell

We can also start the Bash from the command line. MS-DOS or PowerShell can be used to start bash shell with the bash command like below.

OR

Run Bash Commands On Windows

We can run any Linux bash command on Windows like below. In this part, we will run commands like ping, uname , lsb-release.

Download Git Bash For Macbook Pro

Access Windows Drives C: , D:

Terminal Bash Mac

After starting the bash on Windows we may need to access Windows partitions like C:, D:, and the users Documents and Settings folders. These partitions and folders are mounted in /mnt directory with their partition names. In this following example, we see the folders are listed in the C: partition.