Linux2Intune – Linux enrollment in Intune

When testing the Ubuntu functions in Intune, the initial enrollment bothered me the most. Right now, the Linux user has to run several commands in the terminal to enroll the linux device to Intune. While the commands would only need to be copied and pasted from Microsoft’s official instructions, there are some potential errors. While waiting for a simpler method from Microsoft, I have been working on a workaround.

I have therefore created a Bash script including a Graphical User Interface (GUI) to facilitate the work. The user is supported during onboarding, offboarding, update of the Intune app as well as during up- and upgrade of the operating system.

How does the enrollment of Linux in Intune work?

First of all, you will need to install the Intune App on your Linux machine and then start the enrollment process which is documented here: Enroll device

  1. Open the Microsoft Intune app.
  2. Sign in with your work or school account.
  3. Review the pre-enrollment screens. Then select Next to begin enrollment.
  4. Wait a few minutes while the Intune app enrolls your device.
  5. If instructed to, update the settings on your device to meet your organization’s security requirements.
  6. An on-screen confirmation appears when your device is enrolled and ready-to-use for work. You can begin using your device for work right away.
  7. Sign in to Microsoft Edge with your work or school account to access your org’s internal websites.

What are the system requirements?

  • Currently only Ubuntu is supported. According to Microsoft there will be more supported Linux distributions in the future.
  • Ubuntu on WSL2 is not supported.


In contrast to Microsoft’s instructions, the user only has to execute a single command:

With GUI:

sudo curl -sSL | sudo bash

Without GUI (supports only the installation of the Intune App):

sudo curl -sSL | sudo bash

The shortened url are redirected to the following websites:

With GUI:

Without GUI (supports only the installation of the Intune App):


An active internet connection is required to add the Microsoft repository and download the Intune app. In addition, the executing user must have Sudo rights.

  • Active Internet connection
  • Sudo rights


Microsoft Intune:

  • Intune – Onboarding:
    o Install Intune App if not already installed and opens the App.
  • Intune – Offboarding:
    o Uninstalls the Intune App but does not delete the Intune and Azure AD Object.
  • Intune – Update App:
    o Checks if the Intune App is installed and updates the App if there is a newer Version available.
  • Back to Main Menu

Update and Upgrade System:

  • Updates and Upgrades the OS, if updates are available.

Any suggestions or questions? Please Message me at Twitter: