How to Open the Ubuntu Nautilus File Browser from the Terminal

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 1

Recently, we showed you how to open a directory in Terminal from within Nautilus. However, what if you’re working on the command line in Terminal and need to access the same directory in Nautilus? There’s an easy solution for that.

NOTE: When we say to type something in this article and there are quotes around the text, DO NOT type the quotes, unless we specify otherwise.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 2

To open the current directory open in Terminal, type the following command at the prompt and press Enter.

nautilus .

NOTE: Be sure to type a space between “nautilus” and the period (“.”).

It doesn’t matter which directory is active in Terminal before jumping to a specific directory in Nautilus.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 3

Nautilus opens directly to the specified directory.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 4

You can easily jump to other directories in Nautilus, such as your Home directory…

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 5

…or your Music directory. You can also jump to other directories within your Home directory, such as Documents (nautilus ~/Documents), pictures (nautilus ~/Pictures), or Downloads (nautilus ~/Downloads).

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 6

Jumping to directories you created are just as easy. Note that for directory names that contain spaces, preface each space with a backslash (\).

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 7

If there are certain directories you access a lot, you can create aliases, or shortcuts, to access those directories in Nautilus from Terminal. For example, you can create the following alias so you can simply type “nh” to access your Home directory in Nautilus.

alias nh=’nautilus .’

See our article to learn how to create and use aliases to customize Ubuntu commands.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 8

Then, on the command line in Terminal, you can type “nh” from any directory to jump to your Home directory in Nautilus.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 9

To close the Terminal window, type “exit” at the prompt and press Enter, or click the X button in the upper-left corner of the window.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 10

You can also create a bash shell script containing the “nautilus .” command. This allows you to press Alt + F2 to access the command bar from Unity, type “nh” (or whatever filename you assigned to the script), and press Enter, to open your Home directory without ever opening a Terminal window.

NOTE: You can also click on the resulting icon for your script to run it.

See our Beginner’s Guide to Shell Scripting series to learn how to create shell scripts.

how-to-open-the-ubuntu-nautilus-file-browser-from-the-terminal photo 11

If you’re already in Nautilus and you need to move to a different directory, you can use the keyboard to get there if you show the location entry instead of the breadcrumb bar.

More stories

How to Show/Hide All Hidden Startup Applications in Ubuntu 14.10

We’ve recently showed you how to manage startup applications in Ubuntu 14.04, just like you can in Windows. However, when you access the Startup Applications Preferences tool not all startup applications are listed. Some are hidden. We’ll show you how to reveal these hidden applications.

Windows 8.1 Guide: What Is It and Why Does It Matter?

Modern technology is overflowing with operating systems. Android, iOS, and Blackberry are all examples of mobile operating systems while Chrome OS, Apple OS X and, of course, Windows are classified as desktop operating systems. The primary role of an operating system should be simply defined, but as

Desktop Fun: Dragonflies Wallpaper Collection Series 1

Dragonflies are beautiful to look at with their variety of colors and awesome to watch as they flit back and forth. While away lazy summer afternoons with these gentle masters of the air on your desktop with the first in our series of Dragonflies Wallpaper collections.