sudo installer -pkg /Volumes/someapp/someapp.mpkg -target /

Install an mpkg from the command line on OSX

Installing most OSX apps is just a matter of dropping it in /Applications, either GUI-wise or with cp -r. However, many packages are distributed in "mpkg" format, and those have to be installed with an installer. If you don't want to go to the trouble of firing up VNC to install an mpkg, you can use the "installer" command. This will install an application from a .mpkg it to /Applications system-wide. To install a program for just one user, replace "-target /" with "-target username".

4
By: sud0er
2009-04-28 19:43:56

These Might Interest You

  • I put this line in my ~/.bashrc file (which I source via ~/.bash_profile). Now, when I need to install a package, I typed *install* instead of the longer version.


    -6
    alias install='sudo apt-get install'
    haivu · 2011-10-27 19:53:01 9
  • Extracting .gz files and placing the output in another directory in one command line is convenient thing. I just followed some how-to to install Nagios on Ubuntu Lucid Lynx but they give the method to install from archives. I wished to install from the repository. If you do so some files are missing. I've not tested yet but this is an example command line I did to extract sudo sh -c 'gunzip -c /usr/share/doc/nagios3-common/examples/template-object/templates.cfg.gz > /etc/nagios3/objects/templates.cfg' We need privilege to write the destination file. Show Sample Output


    0
    sudo sh -c 'gunzip -c source.gz > destination'
    UnixNeko · 2011-07-05 23:51:01 1
  • Run this command as root to get enough stats. It works on AMD and Intel machines, including desktops. If ran on a laptop it'll give you suggestions on extending your battery life. You'll need to install PowerTOP if you don't have, via 'apt-get install powertop', etc. To grep the output use: sudo powertop -d | grep ... The many command suggestions PowerTOP gives you alone will increase your command-line fu! Show Sample Output


    3
    sudo powertop
    rkulla · 2010-04-19 21:59:29 2
  • Install the unrestricted version of libavcodec . It will keep away from any issues or missing codecs in video editors or transcoders. Install unrestricted version of libavcodec by the command.


    2
    sudo apt-get install libavcodec-extra
    unixmonkey57489 · 2014-06-03 16:28:22 1
  • Command to install everything on a debian based system with the prefix you indicate.


    0
    apt-cache search pidgin* | awk '{print$ 1}' | tr '\n' ' ' | xargs aptitude -y install
    insaneisnotfree · 2011-04-13 08:01:22 0
  • This command tar?s up a directory and sends the output to gzip, showing a rate of 223MB/s. This may require you installing the pv command. For debian based users out there: sudo aptitude install pv Show Sample Output


    4
    tar zcf - user | pv /bin/gzip > /tmp/backup.tar.gz
    nlinux · 2009-02-18 14:50:45 3

What Others Think

very useful.
battavia · 472 weeks and 6 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: