How to Install Linux Software in Windows 10’s Ubuntu Bash Shell

how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 1

Install Windows 10’s Ubuntu-based Bash shell and you’ll have a complete Ubuntu environment that lets you install and run the same applications you could run on an Ubuntu-based Linux system. Just like on Ubuntu, though, you’ll need the apt-get command to install and update software.

Note that Windows 10’s Linux subsystem doesn’t officially support graphical applications or server software (though it is possible to run some graphical applications, unofficially). Officially, it’s intended for Linux terminal applications and other command-line utilities developers might want.

Windows 10’s Bash shell only supports 64-bit binaries, so you can’t install and run 32-bit Linux programs.

RELATED ARTICLEShow-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 2How to Install and Use the Linux Bash Shell on Windows 10how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 3How to Run Graphical Linux Desktop Applications from Windows 10’s Bash Shell

Apt-get Explained

On Ubuntu and other Debian-based Linux distributions, you use the apt-get command to install software. “Apt” stands for “Advanced Package Tool”. This command downloads software packages from Ubuntu’s centralized software repositories and installs them on your system. If the packages you try to install require–or “depend on”–other packages, apt-get will automatically download and install those packages (known as dependencies) as well. Apt-get works with “.deb” packages, named for Debian, the Linux distribution Ubuntu is based on.

You’ll need to run apt-get along with the “sudo” command, which gives it superuser, or root, permissions. This allows the command to modify and install system files in the Linux environment. You’ll have to enter your current user account’s password when you use sudo.

How to Download Updated Package Lists

First, you’ll want to run the following command to download up-to-date package lists from the software repositories:

sudo apt-get update

how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 4

You’ll want to do this before you install any package.

How to Install a Package

If you know the name of a package you want to install, you can download and install it with the following command, replacing “packagename” with the name of the package you want to install:

sudo apt-get install packagename

For example, if you wanted to install Ruby, you’d run the following command:

sudo apt-get install ruby

You can press the Tab key while typing the name of a package (or any command) to use Bash’s autocomplete feature, which will help you automatically finish typing things and suggest available options, if multiple options are available.

After running this and other apt-get commands, you’ll be presented with the changes that will be made and you’ll have to type “y” and press Enter to continue.

how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 5

How to Search for a Package

You may not always know the name of the package you want to install. In this case, you can use the apt-cache command to search your downloaded package cache (the lists that were download with apt-get update) for a program. This command searches package names and descriptions for the text you specify.

This command doesn’t require sudo, as it’s just a simple search. However, you can run it with sudo if you like, and it will still work.

apt-cache search sometext

For example, if you wanted to search for packages related to w3m, a text-based web browser for the terminal, you’d run:

apt-cache search w3m

how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 6

How to Update All Your Installed Packages

To update your installed software packages to the latest available versions in the repository–which gives you any security updates available for your current packages–run the following command:

sudo apt-get upgrade

Remember to run the “sudo apt-get update” command before you run this command, as you need to update your package lists before apt-get will see the latest available versions.

how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 7

How to Uninstall a Package

To uninstall a package when you’re done with it, run the following command:

sudo apt-get remove packagename

The above command just removes the package’s binary files, but not any associated configuration files. If you’d like to remove everything associated with the software package, run the following command instead:

sudo apt-get purge packagename

Neither of the above commands will remove any “dependencies,” which are packages that were installed because they were required for a package. If you uninstall a package and then remove it later, your system may still have a number of additional dependencies that are no longer necessary. To remove any packages that were installed as dependencies and are no longer required, run the following command:

sudo apt-get autoremove

how-to-install-linux-software-in-windows-10-and-8217;s-ubuntu-bash-shell photo 8

How to Install Other Software

The above commands will help you install and update most common software you’ll require. However, some software will be installed through other commands and tools.

For example, Ruby gems are installed with the “gem install” command once you’ve installed Ruby via apt-get. Ruby has its own software installation system that’s separate from apt-get.

Some software packages are available in PPAs, or “personal package archives,” that are hosted by third parties. To install these, you’ll need to add the PPA to your system and then use the normal apt-get commands.

Newer software may need to be compiled and installed from source. All the packages you install with apt-get were compiled from source by Ubuntu’s build system and conveniently packaged into .deb packages you can install. You should avoid this if possible, but it may be unavoidable in some cases.

Whatever the case, if you’re trying to install another Linux application, you should be able to find instructions that tell you how you should install it. The same instructions that work on Ubuntu 14.04 LTS will work in Windows 10’s Bash shell. When it’s updated to the next major version of Ubuntu, the same instructions that work on Ubuntu 16.04 LTS will work on Windows 10.

Article How to Install Linux Software in Windows 10’s Ubuntu Bash Shell compiled by Original article here

More stories

Not All Appliances Work with Smart Outlets. Here’s How to Know

Smart outlets are a cheap way to turn your ordinary appliances and fixtures into smart devices. With a smart outlet, you can turn your appliances on and off from your phone, or (in some cases) with your voice through devices like the Amazon Echo. But not every device will work with smart outlets.

How to Install and Use Add-ins for Microsoft Office

Microsoft Office allows you to add more functionality through add-ins. Many modern add-ins also work with Office for iPad, Office Online, and Office for Mac–not just traditional desktop versions of Office for Windows.

How to Delete Text Messages and iMessages in iOS

Whether you got them by iMessage or SMS, sometimes you need to remove messages from your iOS device’s message history. Maybe you’re clearing out old clutter, or maybe you need to remove messages with more sensitive information. Whatever your reason, you can remove specific messages from

How to Migrate from Evernote to OneNote

Evernote is going to be limiting their free plans and increasing the prices of paid plans. If you’ve ever thought about switching to Microsoft’s OneNote instead, now is probably a good time. Thankfully, Microsoft has released an official tool for migrating your Evernote data into OneNote.

Use Voice Dictation To Speak To Your Mac

Macs have voice dictation built-in, allowing you to talk instead of type. This feature functions more like voice dictation on a mobile operating system, and less like the more complicated Speech Recognition feature found in Windows.