Macos Install Pkg Command Line


Select Install macOS (or Install OS X) from the Utilities window, then click Continue and follow the onscreen instructions. Learn more A bootable installer doesn't download macOS from the internet, but it does require an internet connection to get firmware and other information specific to the Mac model. I sometimes need to install updates remotely on a server I maintain. I already knew about the command line version of softwareupdate, but I was looking for a way to install packages (.pkg) that were already located on the remote box. I finally found the installer command. To install a package, type: sudo installer -pkg Desktop/Java1.4.1.pkg.

Installation of latest stable release via Homebrew on macOS 10.13 or higher. There are several ways to install PowerShell on macOS. Choose one of the following methods: Install using Homebrew. Homebrew is the preferred package manager for macOS. Install PowerShell via Direct Download; Install from binary archives. See the Hello World in 5 minutes tutorial to install.NET and build your first app. Windows Linux macOS Docker.NET is a free, cross-platform, open-source developer platform for building many different types of applications.

Create an OS X package from the command line 8 comments Create New Account
Click here to return to the 'Create an OS X package from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.

Will this break resource forks? I often use hfstar but can't rely on users to have it.

WOW!!! I am all for CLI stuff and am trying to do everything I can using CLI - but thats incredibly difficult compared to using the PackageMaker that comes with Developer Tools.

For info on using PackageMaker

You probably have to have Dev registration but its free. If you have downloaded Developer Tools, you are already registered to do that.

I was just learning how to create packages this weekend, and I was surprised how easy it actually is.

The GUI is great for a one off. But for anything that requires consistency, anything that you do again and again, the CLI is great because it's scriptable. Script it and forget it.

That's right!


Short answer: Unfortunately, probably not.

Macos Install Pkg Command Line Mac

Longer answer:
Within an Apple installer pkg, the files to be installed are all stored in the Archive.pax.gz file. So while the pkg itself and its contents are safe to tar up, the pax utility does not support resource forks AFAIK.

Also, I don't know whether the package command-line utility calls pax to do its work or whether the necessary functions are built-in to package along with some kind of added resourcefork support.

There may be a way to hack the pkg after it's been built with package, by manually using the hfspax utility to build a replacement Archive.pax.gz, but would the Installer app honour the resource forks when it's time to install? (hfspax is available in Fink).

If anyone has time to experiment with this, please post your results here.

/usr/bin/package is a csh script (yuk!); view it and you'll see it uses pax.

AFAIK, hfstar (and hfspax?) make archives with the resource forks stored in them as somdir/somefile/..namedFork/rsrc so when they come out i *think* that standard tar or pax will un-archive them properly. anyone out there know for sure?

Awesome! I've been waiting for this kind of information for a while. And yes, PackageMaker is there but this is exactly the kind of stuff you want to automate and forget.

Thank you! You just made my projects much easier.

Before my shift to using macOS as my daily work operating system, I was using a myriad of GNU/Linux platforms. Linux (as well as FreeBSD and OpenBSD, upon which macOS is built) provided me with easy access to the various open source software via a package manager.

What is a package manager

Jan 01, 2017 How to install Java SDK 9 with Maven and IntelliJ Using Homebrew on a Mac November 2017 edition - Duration: 9:47. EvilTester - Software Testing 3,708 views. Install on Mac OS X Run Splunk Enterprise as a different or non-root user. Install on Windows using the command line. The user you choose has specific ramifications on what you need to do before you install the software. Prepare your domain for a Splunk Enterprise installation as a domain user. Aug 13, 2018 A package manager is a command line tool that gives me access to a myriad of pre-built (or sometimes to source code if desired) software packages to install and download on my computer. I could open a terminal and simply type in a command to tell the package manager to download and install any freely available open source software my heart (and. Aug 29, 2019 If you want to run an app from the Mac App Store, copy the.app file to “/Applications/” on your Linux machine then launching it through Darling’s shell commands. Install from DMG To install a program from a.dmg, mount it with hdiutil within Darling.

A package manager is a command line tool that gives me access to a myriad of pre-built (or sometimes to source code if desired) software packages to install and download on my computer. I could open a terminal and simply type in a command to tell the package manager to download and install any freely available open source software my heart (and requirements) desired.

Homebrew will 'install the stuff you need that Apple didn't.'

Although macOS has the App Store, it's not a repository of my favorite open source software (at least not in their raw unadulterated forms). Things like mplayer, wget, and gcc aren't in the App Store and searching for or building the source code for a package can become onerous.

Mac Install Pkg Command Line

Apr 17, 2020 Allows you to create and manage Android Virtual Devices (AVDs) from the command line. Lint A code scanning tool that can help you to identify and correct problems with the structural quality of your code. Sdkmanager Allows you to view, install, update, and uninstall packages for the Android SDK. Android SDK Build Tools.

This is where Homebrew for macOS saves the day!

What is Homebrew

Homebrew touts itself as 'the missing package manager for macOS' and that it will 'install the stuff you need that Apple didn't.' Once installed on your Mac, you'll have access to hundreds of open source packages ready for you at your fingertips. Need to download a youtube video? Open a command prompt and type 'brew install youtube-dl'. Need to cross-compile for another platform? Type in 'brew install gcc'. Want to play Windows PC based games on macOS? Type in 'brew install wine'. It's that easy.

Installing Homebrew

Installing Homebrew also couldn't be easier.

  1. Start terminal.
  2. At the command line type in:
    • /usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'
  3. Hit Return.
  4. Hit Return again to allow the install to start.
  5. Enter your Password.
  6. Hit Return.

Wait for the download to start and for the installer to finish. That's it!

Installing software packages

Once you've got Homebrew installed, you can now download any open source software you like, called formulae, that is maintained by the package manager developers. There are hundreds of apps to choose from. For example, let's say I wanted to install a lightweight torrent client like Transmission. Here's how to do it.

  1. Open terminal.
  2. At the command line type in:
    • brew install transmission
  3. Tap Return.
  4. Done!

That's it! Super fast and easy.

Macos Install Package Command Line

Final comments

With the amazing graphical interface Apple made on top of its BSD underpinnings, it's easy to forget the power that the UNIX command line can provide. It's flexible and fast with an incredible amount of free software that can turn any user into a power user. Do you think the App Store should rollout open source software packages into its scope? Is having third-party package managers such as Homebrew the better option? Lets us know your thoughts in the comments!

We may earn a commission for purchases using our links. Learn more.

Macos Install Pkg Command Line Linux

if only you knew the power of the dark side...

Apple doubles trade-in value of select Android devices for a limited time

Apple has quietly upped the trade-in price of several Android smartphones for a limited time, doubling the value of some handsets.

Mac Command Line Open File

Installing packages from the command line 13 comments Create New Account
Click here to return to the 'Installing packages from the command line' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.

is that some packages (notably Fink) don't work using this installer application. Kind of frustrating when you need a command-line app on a remote computer and you can't install Fink in order to install the app! :-)
Quality websites for inexpensive prices (Is that an oxymoron?)

I also discovered this installer command the day that I read the recent article here about installing a no-ip linux client as a startup item. The .pkg that was pointed to by that article did not work via the command line. I had to do it from home. Even then it still didn't seem to be workgin right, though, so I removed it and installed the fink version which seems to be working, once I understood how to set that version up. A fully working command-line installer is much needed, but if it works on some things now that's still pretty good....
--- I hate Microsoft and I vote

You have to run these packages (OS updates usually fall under this category) from root.
cd /
sudo /usr/sbin/installer -pkg /path/to/pkg.pkg -target /

4am Media, Inc. Mac OS X Training and Consulting

sudo reboot is a harsh command, I believe you'd use all unsaved documents, I wouldn't recommend doing it this way.
Something like:
sudo osascript -e 'tell application 'Finder' to restart'
Would be much better. It would get canceled if there is unsaved data.

arr, but if your using the cli to install packages most likely the box is on a remote site, so u cant press 'save' or 'don't save' and the restart would time out
there has to be away of avoiding this because it would be nice to be able to restart and / or log out a user via the cli
'The time has come,' the walrus said. 'To talk of many things...'

there is ... use VNC to control the GUI remotely. for the few times I really need GUI access to my server remotely, it's perfect. For security's sake, don't add a firewall rule to open the port. Tunnel the connection through ssh from the machine you're sitting on ... ssh -L 5900:localhost:5900 remote_ip_or_dns
Then use localhost & port 5900 in your vnc client. You can have the remote machine always running the vnc server, or run it from the ssh shell.

Of course, if you go this route, isntalling via the CLI is pointless since you can just do it via the GUI.

Macos Install Pkg Command Line Command

The applescript is all very nice, but if no one is logged into the remote machine is does not work, the response is '29:36: execution error: Application isn't running (-600)' (tested with OS X 10.3.5)

This is great. Now if only I could create packages from the command line rather than using PackageMaker interactively.

Macos Install Pkg Command Line Linux

You can create packages from the command line. i've done it in 10.4, but haven't tried in 10.5.
in tiger, PackageMaker will load in /Developer/Applications/Utilities/PackageMaker.app
but really all .app's are just folders, so you can call the CLI by /Developer/Applications/Uitilities/PackageMaker.app/Contents/MacOS/PackageMaker
you'll have to feed it a number of flags like -build and -p... i think there's a man page for it somewhere.

If you look in /usr/sbin/ a couple of utils already stand out because of their name:
You can find out what they do by looking at their man pages or running them (not as root obviously)

Some of these don't have man pages. Notably (for me):
opendiff - run the cocoa diff utility on two files
scselect - select network location
disktool - I'm sure this does something handy

Installing multiple packages from the command line

Macos Install Pkg Command Line Windows 10

You may also find installpkg to be helpful. Installpkg will allow you to easily install multiple packages with just a single command. If you have a collection of dmg's each of which has an installer in the root directory, installpkg makes installing all the packages a snap.
  • Most Viewed News

    • Portainer Docker Raspberry Pi
    • Macos Sierra Security Updates
    • Install Ping In Docker Container
    • Download Itunes To Macbook Air