How to Install Slack for macOS using JumpCloud Commands

** December 2020 Update ** – This script has been updated, so when it mounts the DMG it now doesnt pop up wiht the folder. So it is completly silent in the background

The next script talks you through how to install Slack for macOS using JumpCloud Commands. It follows a similar structure to the other commands I have posted. Creates a temp repo on the mac, Kills the old version, removes the old version, downloads the latest version, mounts, installs, and removes the temp files. Simple but effective. I have broken this out of this post as I am separating all of the commands into there own blog post.

Install Slack for macOS using JumpCloud Commands.

# Script to download, Silent Install and then clean up once installed Slack
# Writen by

#Kill Old Version
killall Slack

#Remove Old Version of Slack
sudo rm -rf /Applications/

#Make temp folder for downloads.
mkdir "/tmp/slack/";
cd "/tmp/slack/";

#Download Slack.
curl -L -o /tmp/slack/slack.dmg "";

#Mount DMG
hdiutil attach /tmp/slack/slack.dmg -nobrowse;

#Copy App to Applications
sudo cp -R "/Volumes/Slack/" /Applications;

#Open Slack
open /Applications/

#Unmount DMG
hdiutil detach /Volumes/Slack -force;

#tidy up
sudo rm -rf "/tmp/slack";

Other JumpCloud posts you might like

4 thoughts on “How to Install Slack for macOS using JumpCloud Commands”

  1. Hi Richard,

    This is my first time trying to run one of your scripts. If I am trying to copy and paste this script for testing what is the format that I should be using?



    • Hi Evan
      How do you mean?
      I set all my scripts up using the commands option like below (if its a mac script)
      Screenshot of Slack install script
      Hope that helps

      • The first time I ran it I got a bunch of errors but it seems to have worked. Really appreciate the help.



        • Hi Evan
          Send me a screenshot of errors if you get a chance, I will have a look!
          Richard at


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.