- Published on
Setting Default Browser in Terminal using XDG
- Authors
- Name
- Shailesh Aanand
- @shaileshaanand
Setting Default Browser in Linux Terminal
Using xdg
-
Install
xdg-utils-
On Debian based systems, you can install
xdg-utilswithsudo apt install xdg-utils -
On Arch based systems, you can install
xdg-utilswithsudo pacman -S xdg-utils
-
-
Set Default Browser
xdg-settings set default-web-browser firefox.desktopReplace
firefox.desktopwith the name of your browser's desktop file.-
You can list all available browsers with
ls /usr/share/applications/*.desktop -
To search for a specific browser, use the
grepcommand.ls /usr/share/applications/*.desktop | grep -i firefoxReplace
firefoxwith the name of your browser.
-