this post was submitted on 19 Jan 2024
162 points (97.1% liked)

Linux

48328 readers
652 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Just sharing something neat I learned today about Linux...

In Windows, I used to do this a lot:
-- Be at a command prompt, in some directory, e.g.: C:\my files\more files
-- When I need to see that same folder in the Windows GUI, I'd type: start . (note the period, meaning "this directory")
-- The Windows file manager would open in a new window, focused on that same folder as the path.

I realized today I didn't know how to do that in Linux (I'm on Ubuntu) so I searched around and found the xdg-open command.

The man page for xdg-open says:

xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser.

At any terminal prompt, I type something like:

xdg-open .

or xdg-open ~/Documents

And boom! A new KDE Dolphin files window appears, focused on that path.

or this works too, but with a browser:

xdg-open http://eff.org

Rock and/or roll!

you are viewing a single comment's thread
view the rest of the comments
[–] Dehydrated@lemmy.world 17 points 10 months ago (4 children)

I'd create an alias: alias open=xdg-open

It's easier to type in that way

[–] perishthethought@lemm.ee 8 points 10 months ago (1 children)

I totally did, yes:

alias xo='xdg-open $1 &>/dev/null'

... since it always has some odd output when I run it here on my pc.

[–] Dehydrated@lemmy.world 2 points 10 months ago

That's actually a great idea, thanks for the suggestion

load more comments (2 replies)