Skip to content

[MacOS] How To Use "open" Command To Open Files In Terminal

Last Updated on 2021-09-13 by Clay

open command

We can use open command to open any thing you want in terminal, no matter it is a folder, file or url.

Let's take a look for some simple examples.


Open a folder

We can use the following command to open a folder.

open ~/Pictures/

Output:


Open a picture

We can use the following command to open a picture via default program (The following picture is a LSTM neural network).

open ~/Pictures/LSTM.png

Output:


Open a url

Let's take my site as an example:

open https://clay-atlas.com/us

Output:

As you can see, the open command in Mac OS can open everything if it has a default program to open, it's very convenient.


References


Read More

Leave a ReplyCancel reply

Exit mobile version