Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Mac OS X Terminal – Create Bootable OS X Installer

Posted on April 7, 2017September 2, 2021 By David Kittell

Need to create a thumb drive installer for Mac OS? This script will help you out

#!/bin/sh

#  MacOS_InstallUSB.sh
#  
#
#  Created by David Kittell on 4/7/17.
#

# Variables - Start

# Text Variables - Start
txtund=$(tput sgr 0 1)              # Underline
txtbld=$(tput bold)                 # Bold
txtbldund=${txtund}$(tput bold)     # Bold Underline
txtbldred=${txtbld}$(tput setaf 1)  # Bold Red
txtbldgreen=${txtbld}$(tput setaf 2)  # Bold Green
txtbldblu=${txtbld}$(tput setaf 4)  # Bold Blue
txtbldwht=${txtbld}$(tput setaf 7)  # Bold White
txtrst=$(tput sgr0)                 # Reset
# Text Variables - Stop

# Variables - Stop

clear

echo "${txtbld}Current Volumes:${txtrst}"
ls /Volumes | grep -v Recovery\ HD | grep -v MacSSD | grep -v Macintosh\ HD

echo "\n${txtbldund}Type the name of volume/drive you want to setup, followed by [ENTER]:${txtrst}"
read sVolume

echo "\n${txtbldred}We will now format ${sVolume}\nARE YOU SURE?, type y for Yes or n for No followed by [Enter]:${txtrst}"
read sConfirmation

case $sConfirmation in
[yY])
echo "\n${txtbldgreen}We will now format ${sVolume}${txtrst}"
# sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/${sVolume} --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/${sVolume} --nointeraction
say "Mac OS Installation Drive Is Ready"
;;
*)
echo "\n${txtbldgreen}No changes have been made.${txtrst}"
;;
esac
Originally Posted on April 7, 2017
Last Updated on September 2, 2021
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Mac OS X Shell Mac OSX UNIX UNIX Shell Scripts mac os xOSXSierraThumb Drive Installer

Post navigation

Previous post
Next post

Related Posts

Mac OS X – Get Network Information

Posted on February 27, 2017May 2, 2017

Every once in a while you need to get some basic network information from your Mac or a Mac you are supporting, this script below will help get you some helpful information. #!/bin/sh clear sExternalMACALService="http://dns.kittell.net/macaltext.php?address=" # List all Network ports NetworkPorts=$(ifconfig -uv | grep ‘^[a-z0-9]’ | awk -F : ‘{print…

Read More

Bash – Download YouTube Music

Posted on August 7, 2018June 30, 2019

sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl sudo apt update sudo apt upgrade -y sudo apt install youtube-dl python ffmpeg net-tools -y # Install YouTube Downloader CLI brew install youtube-dl ffmpeg # https://github.com/rg3/youtube-dl # Download YouTube video, convert the video to MP3 and delete the original video…

Read More

Computer Details

Posted on September 17, 2013October 26, 2015

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ComputerDetails.aspx.cs" Inherits="ComputerName" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title>Computer Details</title> </head> <body> <form id="form1" runat="server"> <table cellpadding="2" cellspacing="0" border="0"> <tr> <td> Windows User: </td> <td> <asp:TextBox ID="WindowsUser" runat="server" /> </td> </tr> <tr> <td> Machine Name: </td> <td> <asp:TextBox ID="MachineName"…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes