I was trying to open a png file, but for some reason the xdg-open and gnome-open commands weren't working. For example:
-bash: gnome-open: command not found
Does anyone know why? I thought I could use Linux commands on Mac terminal.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
If you're trying to open an image file like a .png, .jpg, etc. from Terminal in OS X, you can use
open filename.png where filename.png is the actual pathname of the target image file. By default, it will open in Preview.
In Terminal, type
man open and press enter to read the BSD General Commands Manual for the
OS X is not Linux and Linux specific commands like
gnome-open do not exist in
OS X unless they've been ported by managers like Homebrew and you have installed using one of the managers like Homebrew or installed from source code by yourself, that is if you can satisfy the dependancies involved too (which is what Homebrew does for the command it ports).