21 C
Jaipur
Thursday, December 3, 2020

How To Add Microsoft’s Linux Software Repository

Must read

How to Install Cerb Collaboration and Email Automation on CentOS 8

Cerb is a free, open-souce and web-based collaboration and automation tool used for sending high volumes of emails. It is written in PHP and...

How To Add Downloaded .box File To Vagrant In Linux

The Linux distributions are available for download in a range of different formats. The most widely available format is ISO. Apart from ISO, they...

Over the past few years, Microsoft has developed many software products for Linux operating systems. These software are distributed via standard software repositories created by Microsoft development team. So that you can easily install applications, update and upgrade them using the your Linux distribution’s default package manager. In this brief guide, we will see how to add Microsoft’s Linux software repository in a Linux system.

Currently, Microsoft dev team has built APT repository for DEB-based systems and YUM repository for RPM-based systems. The Microsoft’s software repository for Linux comprised of multiple sub-repositories, for instance prod and mysql-server.

The prod repository, short for production repository, contains the packages that can be used in production. Meaning – the packages in this repository are well tested, stable and suitable for using in the production environments.

As the names says, the mysql-server repository contains packages for Microsoft SQL server for Linux.

Important note:

Please be mindful that if you are going to install and use the packages in the Microsoft’s Linux software repository, you must comply with Microsoft’s terms and conditions. If you don’t agree to the license terms, you should not use the application.

Add Microsoft’s Linux Software Repository

When you install a Microsoft product on your Linux machine, it will automatically add the respective software repository in the system. Alternatively, you can add the common Microsoft Linux software repository as described below in order to install, update and upgrade all supported applications for Linux.

1. Add Microsoft’s Linux software repository in RHEL, CentOS, Fedora

If you are using Redhat-based systems, you can add the Microsoft’s repository for Linux like below.

Add the Microsoft’s GPG public key:

$ curl -sSL https://packages.microsoft.com/keys/microsoft.asc > ./microsoft.asc
$ sudo rpm --import ./microsoft.asc

Next add the repository depending upon the distribution’s version you use:

For example, if you are using RHEL 6 / CentOS 6, use the following command:

$ sudo rpm -Uvh https://packages.microsoft.com/config/rhel/6/packages-microsoft-prod.rpm

On RHEL 7 / CentOS 7:

$ sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm

On RHEL 8 / CentOS 8:

$ sudo rpm -Uvh https://packages.microsoft.com/config/rhel/8/packages-microsoft-prod.rpm

2. Add Microsoft’s Linux software repository in SUSE, openSUSE

Add Microsoft’s GPG public key:

$ curl -sSL https://packages.microsoft.com/keys/microsoft.asc > ./microsoft.asc
$ sudo rpm --import ./microsoft.asc

Next add the software repository on SUSE Linux Enterprise Server 12:

$ sudo rpm -Uvh https://packages.microsoft.com/config/sles/12/packages-microsoft-prod.rpm

On SUSE Linux Enterprise Server 15:

$ sudo rpm -Uvh https://packages.microsoft.com/config/sles/15/packages-microsoft-prod.rpm

3. Add Microsoft’s Linux software repository in Ubuntu

Ever since Canonical has partnered with Microsoft, Ubuntu is receiving more support from Microsoft dev team than other Linux distributions.

If you are using Ubuntu 16.04 LTS, run the following commands one by one to add the Microsoft’s GPG public key and the software repository:

$ curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ sudo apt-add-repository https://packages.microsoft.com/ubuntu/16.04/prod
$ sudo apt-get update

On Ubuntu 18.04 LTS:

$ curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
$ sudo apt-get update

On Ubuntu 20.04 LTS:

$ curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod
$ sudo apt update

Verify repositories

You can verify if the repositories have been successfully added using any one of the following commands.

To list the installed repositories in Deb-based systems, run:

$ sudo apt-cache policy

List the installed repositories on RPM-based systems such as RHEL , CentOS, using the following command:

$ sudo yum repolist

Or,

$ sudo yum repolist all

On SUSE/openSUSE:

$ zypper lr

Or,

$ zypper repos

For more details, refer the following guide:

Conclusion

You know now how to add Microsoft’s software repository for Linux on DEB-based systems and RPM-based systems. Also you learned how to check whether the repositories are added or not.

Once you added the Microsoft’s software repository for Linux, you will be notified about software updates, bug fixes and new features whenever they are available. You can then update them using your default package manager on your Linux system.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to Install Cerb Collaboration and Email Automation on CentOS 8

Cerb is a free, open-souce and web-based collaboration and automation tool used for sending high volumes of emails. It is written in PHP and...

How To Add Downloaded .box File To Vagrant In Linux

The Linux distributions are available for download in a range of different formats. The most widely available format is ISO. Apart from ISO, they...

Critical Oracle WebLogic Vulnerability Flaw Actively Exploited

Juniper Threat Labs researchers observed active attacks on Oracle WebLogic software using CVE-2020-14882. This vulnerability, if successfully exploited, allows unauthenticated remote code execution.  Researchers found...