Set Your Mac’s Wallpaper With A Terminal Command

Set Your Mac’s Wallpaper With A Terminal Command

Setting your Mac’s wallpaper is easy enough, but if you’re looking to automate changing them up, adding a wallpaper to a setup script, or whatever else, you’ll need to do it from the command line. OS X Daily shows you how.

Essentially, you’re using a part of a script from AppleScript here, so it’s easy to adapt this to different automation setups you might have. Open up Terminal and type this in, replacing “/path/to/picture.jpg” with the location of your image:

osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/path/to/picture.jpg"'

That’s it, you’ll instantly have a new wallpaper. It’s not too exciting on its own, but it’s a good command to know for automation purposes.

Setting Wallpaper from the Command Line in Mac OS X [OS X Daily]

The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.