Friday, October 24, 2014

Linux commands equivalent to Windows start command

In Windows DOS prompt console, you can use the start program to do a lot of things. Here are just a few examples:
>start .   -- open the current folder. Notice this is very helpful if your path is very long. It saves you a lot of time having to traverse to the folder you want manually.
>start http://yahoo.com   -- open yahoo website
>start c:\temp  --- open the Windows dialog with the c:\temp folder opened.


Now, how do we do this in Linux?

If you are using Gnome desktop manager, then you can run this. How do you know you are using a Gnome desktop manager? You can run >pstree and look for gnome keywords. If you do see one, you are probably using a Gnome desktop manager.

>gnome-open .
>gnome-open http://yahoo.com
>gnome-open c:\temp



A generic way to do this is to run xdg-open, but this script is not always installed.

>xdg-open .
>xdg-open http://yahoo.com
>xdg-open c:\temp