[Linux] use "open" command to open files and folders with the default program like MacOS

Опубликовано: 20 Октябрь 2024
на канале: Let's Fix That Error
4,457
11

How to make an "open" command to open files and folders in the default program for each file. This works in Mac OS with the "open" command in Terminal. But how to make it work in Linux ?


Linux has "xdg-open" command which is similar to "open" command in MacOS. So we can make an alias for that command by adding this command to the ~/.bashrc file.


alias open="xdg-open"


I hope this makes using Linux a bit easier and greater.