open

opens files and URLs on macOS

TLDR

Open file with default app
$ open [file]
Open URL in browser
$ open [https://example.com]
Open with specific app
$ open -a [Safari] [file.html]
Open directory in Finder
$ open [directory]
Open current directory
$ open .
Reveal in Finder
$ open -R [file]

SYNOPSIS

open [options] [file...]

DESCRIPTION

open opens files and URLs on macOS. Uses default or specified applications.The command launches applications with files. macOS specific utility.

PARAMETERS

FILE

File or URL to open.
-a APP
Open with application.
-e
Open in TextEdit.
-t
Open in default text editor.
-R
Reveal in Finder.
-n
Open new instance.
--help
Display help information.

INSTALL

sudo dnf install kbd
sudo pacman -S kbd
sudo apk add kbd
sudo zypper install kbd
nix profile install nixpkgs#kbd

CAVEATS

macOS specific. Use xdg-open on Linux. Application names case-sensitive.

HISTORY

open has been part of macOS for launching files with associated applications.

SEE ALSO

xdg-open(1)