LinuxCommandLibrary

open

opens files and URLs on macOS

TLDR

Open file with default app

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

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.

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), start(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community