Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

command line to open a window

using command line, how can i open a window containing the folder?

I am looking for a unix command similar to Mac:

$> open /tmp

That command will open /tmp in an (UI) window.

So what's the equivalent in linux? I am currently using Debian.

like image 875
Neilvert Noval Avatar asked Jun 13 '26 09:06

Neilvert Noval


2 Answers

To open a folder (or any type of file/URL) with the preferred application in a Desktop Environment independent way, use xdg-open:

xdg-open /tmp
like image 106
mtvec Avatar answered Jun 15 '26 02:06

mtvec


In Ubuntu, with Gnome, you'd do

nautilus /tmp

Under KDE, I guess you'd do

konqueror /tmp

This blog post talks about alternatives to nautilus and konqueror.

like image 27
glmxndr Avatar answered Jun 15 '26 04:06

glmxndr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!