How to install a .dmg file without being a sudo user

command linedmginstallsudo

I am on macOS Sierra version 12.10.16. I downloaded an application. This app has .dmg extension. I would like to install it without using sudo or without being one of the sudo users.

When I do hdiutil attach <image>.dmg from Is there a command to install a dmg, it doesn't work.

If I do it using GUI I get this error message:

Modifying “Applications” requires an administrator name and password.

How do I install a .dmg file without being a sudo user?

Best Answer

.dmg is not an app, it is a disk image. If you double-click the file, it should mount a virtual disk in the Finder. From there, you will be able to drag and drop the image into your applications folder.

Since you don't have admin rights on the computer you're using, you'll need to drag it into your user Applications folder (/Users/yourname/Applications/, needs to be created manually)