When developing software, mostly Perl programs, on
Windows XP I use the command line a lot. And one of the
commands I have learned to rely on is
Now and then I have to open a certain directory in
the explorer program, for example to drag and drop
a zip file to Thunderbird in order to email it to
a customer. And just typing
by the directory name does the trick for me. And, no surprise,
start . opens the current working directory,
start .. its parent. Moreover,
start somefile.txt opens somefile.txt, in
my case, in TextPad, and
opens the URL in a browser, in my case Firefox.
Since I am slowly moving my Perl development to Ubuntu,
I was happy to learn that the
works similar to
start on Windows XP.
Note: a reader, peterix, posted a comment
regarding this blog entry recommending to use
gnome-open since it doesn't rely on
Gnome (and is shorter to type).
gnome-open is a lot to type, and Perl
programmers are lazy, I have added the following alias to
g an alias to gnome-open. It might be tempting to
start instead, but
start is already
a command, see
If you want to give it a try, open .bashrc in an editor. Via a terminal:
Navigate to the end of the file (Ctrl+End), add the aforementioned line, and save the file (Ctrl+S).
Next, type in a terminal the following to execute the commands in
Note that the period, followed by a space, in front of
is short for
source followed by space. See
help source (not
man source, since it's a built
in command) for more information on the source command.
You can test the alias for example as follows:
Which should open your home directory (in my case in Nautilus).
Should open the Google search start page in a browser. In my case Firefox. Moreover, if Firefox is already running, a new tab is opened.