How to Install Linux Softwares in Windows 10 Bash Shell Tool

In order to have a full Ubuntu environment in Windows, you can install the Linux Bash shell on Windows 10. By doing so, you can install and run the same software that you can run on Ubuntu-based Linux systems.

By installing Ubuntu Bash shell on Microsoft Windows 10, you will be able to enjoy the full Ubuntu environment on Windows OS.

The environment allows you to install and run similar software that you can run on a Linux-based Ubuntu system.

Just like Ubuntu, you can use the apt-get command to install and update the program through Ubuntu resources.

Note that the Linux subsystem of Windows 10 (Bash shell) does not officially support graphic software or server software, although it is unofficially possible to run some graphical software.

Officially, this tool is designed for Linux terminal software and other command-line tools required by developers.

The Windows 10 Bash shell tool only supports a 64-bit binary, so you can not install and run the 32-bit Linux software on it.

Describing the Apt-get command

Ubuntu and other debian-based Linux distributions use the apt-get command to install the software. Apt stands for Advanced Package Tool, which means the advanced package tool.

This command or command retrieves software packages from Ubuntu’s centralized software resources and installs them in the system.

In addition, if the packages that you intend to install them need or are dependent on other packages, the apt-get command will automatically download and install such packages as well.

These packages are known as dependency. The apt-get command works with packages with the “deb.” Suffix, named for Debian.

 Ubuntu Linux Distribution, based on Debian, a base distribution, has been developed.

To use the Bash shell utility, you need to run the apt-get command with the sudo command.

The above command gives users access to a superuser or root access privilege.

Having these permissions allows users to modify and install system files through a command issued to users.

When using the sudo command, you will need to enter the current account password.

Download the updated package list

First, you must run the following command to get Ubuntu’s software package list from the Bash shell. You must repeat this before installing any packages.

Bash Shell در ویندوز 10

Install the package you want

If you know the name of the package you are installing, you can get it and install it using the command below.

To do this, you need to replace the package name with the packagename section of the following command.

sudo apt-get install packagename

For example, if you want to install a Ruby package, you must run the following command in a loose environment.

sudo apt-get install ruby

When typing the name of your package or any other command in your shell, you can use the auto-complete Bash feature by pressing the Tab key on the keyboard.

This feature helps to automatically complete the typing process and offers these options to the user if there are multiple available options.

After executing the command and the other apt-get commands, the changes that will be applied will be shown to the user, which will need to type y in this step and press Enter from the keyboard to continue.

Bash Shell در ویندوز 10

Search the desired package

You probably will not know the name of the package you are installing. In these cases, you can use the apt-cache command below to search for a downloaded cache (a list that was downloaded with the apt-get update command) for a software.

  The apt-cache command provides the ability to search for packet names and descriptions associated with the specified text.

Because the above command is just a simple search, there’s no need to use the sudo expression. However, you can still run this command with sudo if you wish.

apt-cache search sometext
For example, if you want to search the package that is related to the w3m (the text-based web browser for the terminal), you must run the following command.
Bash Shell در ویندوز 10

Update all installed packages

In order to update the installed packages to the latest available Ubuntu source, you must run the command below.

This command will allow any available security update for the user’s current package.

sudo apt-get upgrade
Keep in mind that you must run the following command before executing the previous command. Because before your apt-get command receives the latest available package, your package list must be updated.
Bash Shell در ویندوز 10

Delete the desired package

After you finish the task with the package, you can uninstall it using the following command.

sudo apt-get remove packagename

The command will only clear the binaries of the package, so that other configuration files will remain attached.

If you want to delete all files associated with the software package, you must run the following command instead of the shell.

sudo apt-get purge packagename

None of the commands will remove packets called dependency that require installing another package.

If you want to delete the package first and then delete the dependency separately, your system may still have additional dependency packages that are not necessary for them.

In order to remove any packet that is installed as dependency and no longer requires it, you must run the following command.

Bash Shell در ویندوز 10

Install other software

The instructions in the previous sections of the article allow you to install and update more commonly used software. However, some software will be installed through other commands and tools.

For example, Ruby Gems will be installed using the “gem install” command. Previously, we installed the Ruby package using the apt-get command. Ruby has a personal software installation system that is separate from apt-get.

Some software packages are available in the PPA (Private Packs), hosted by third parties.

To install the package from this source, you will need to add PPA to your system. After that, you just have to use the same apt-get commands.

Probably, the newer software will require compilation and installation from the source. All packages that were installing with the apt-get command were compile by Ubuntu’s internal system source, so that they can easily be call “deb.” Convert to installable packages.

Avoid doing this as much as possible, but in some cases it may also be inevitable.

However, if you are trying to install other Linux software, you can find instructions for installing it.

The same instructions that work on Ubuntu 14.04 LTS will work in the Windows 10 Bash shell tool.

When the 14.04 version is updating to the upcoming version of Ubuntu, the same instructions that work on Ubuntu 16.04 LTS will work on Windows 10 too.

Leave a Reply

Your email address will not be published. Required fields are marked *