How to Make Nautilus Even More Useful in Linux

A photograph of a person typing on a laptop in a table.

Nautilus is a beautiful and sleek file manager for the GNOME desktop environment. It works by providing an accessible interface that is both easy to use and highly extensible. Here we will show you how to level up your file manager with some of the best tweaks and extensions for Nautilus in Linux.

Tip: if you are not comfortable with Nautilus, there are many other alternative file managers that you can install on your Linux distro.

Enable Traditional Path Addresses

One quirk of Nautilus compared to other file managers for Linux is that it doesn’t show the full path of the current directory by default. While you can find this by opening a terminal on that folder and running pwd, doing that is clunky and cumbersome.

To solve this, press Ctrl + L to replace the full path of the currently active folder. You can press the same keybind again to go back to the original path style.

A screenshot of a Nautilus with a text file path.

You can also make the traditional path permanent by running the following command in a terminal:

gsettings set org.gnome.nautilus.preferences always-use-location-entry true

To apply your new settings, reset your current Nautilus session:

Create a Blank Text File Generator

Another quirk Nautilus has is that its context menu doesn’t have an option to create arbitrary files. This can be annoying if you want to create an empty file and you don’t want to open a new terminal session.

To fix this, navigate to your home directory in Nautilus.

Open the “Templates” folder, then right-click the mouse and select “Open in Terminal.”

A screenshot showing the Open in Terminal prompt inside the Templates folder.

Create a new file in the templates folder by running the following command:

Check whether your new context option is working properly by right-clicking on the Nautilus window.

A screenshot showing the new option under the Nautilus context menu.

Select “New Document”, then click your new blank text file option.

A screenshot showing the new text file template in Nautilus.

The navigation sidebar is an iconic part of the modern Nautilus interface in Linux. While it’s a simple way of presenting the important folders on your computer, changing the default values can be confusing to a novice user.

To modify the sidebar values, go to your home directory in Nautilus.

Press Ctrl + H to reveal the hidden files in the directory, then double-click the “.config” folder.

A screenshot showing the hidden files in the home directory.

Open the “user-dirs.dirs” file with your favorite text editor.

A screenshot showing the user-dirs file inside the .config directory.

Modify the directory path of the XDG variable that you want to change. In my case, I want to set my Videos folder to “$HOME/Downloads/Media.”

A screenshot showing an edited user-dirs file.

Save the “user-dirs.dirs” file, then run nautilus -q on a terminal to reload your new settings.

FYI: learn more about what Bash variables are in Linux.

Enable Permanent Deletion for Files

By default, Nautilus will always hold your recently deleted files in its Trash Can folder. This is always helpful whenever you’ve accidentally deleted a file and you want to restore it. However, there are cases where you might want to delete a file without moving it to the Trash Can.

To enable permanent deletion, open Nautilus then click the file manager’s settings menu.

A screenshot showing the menu button for Nautilus.

Click “Preferences” on the dropdown menu list, then scroll down on the Preferences window and select the “Delete Permanently” toggle button.

A screenshot showing the Delete Permanently toggle in Nautilus.

Confirm that your settings are working properly by pressing Right Click on any file and checking for the “Delete Permanently” option.

Enable Secure File Deletion

Nautilus-wipe is a lightweight extension that adds a “secure delete” option to the file context menu in Nautilus. Unlike a regular delete, it ensures that any file you remove will be irretrievable even from data recovery programs.

A screenshot showing the Wipe options in the Nautilus context menu.

Aside from that, this extension also comes with an option to wipe your drive’s free disk space. This is helpful if you want a drive that is completely clean of any residual data.

To install this extension, run the following command in your terminal:

sudo apt install nautilus-wipe

Load your new extension on the current session by reloading your Nautilus process:

Good to know: learn how to encrypt your sensitive files with Tomb in Linux.

Enable Administrator Mode

One of the biggest downsides of Nautilus is that it doesn’t come with a built-in way to open files and run programs as root. This can be frustrating especially if you’ve already opened the Linux system file on the Nautilus GUI only to find out that it requires root access.

Nautilus-admin is a simple extension that adds an “Administrator Mode” option on the file manager’s context menu. Similar to the “Open as Administrator” option in Windows, this gives you a prompt where you can access a folder as the root user.

A screenshot showing the Open as Administrator option in the Nautilus context menu.

To use this for your Nautilus instance, run the following:

sudo apt install nautilus-admin

Hide Files in Your Filesystem

Traditionally, hiding files in Linux requires you to append a dot (.) at the start of a file’s name. The nautilus-hide extension brings this feature straight to your file manager, by providing a context menu option for hiding files.

A screenshot showing the Hide File option in the Nautilus context menu.

This extension also works for multiple files and entire directories. As such nautilus-hide is a handy tool for users that want to hide a large amount of files in their filesystem but don’t want to rename them one by one.

With that said, you can install this extension by running the following:

sudo apt install nautilus-hide

Edit and Convert Images

Nautilus-image-converter is a nifty little tool that provides a way to perform basic image editing straight from your file manager. It works by using the Imagemagick CLI utility as the backbone for its image manipulation features.

Another great feature of this extension is that it can handle multiple image edits at once. For instance, you can select an entire directory of images and resize them at exactly 50% scale.

A screenshot showing the image editing options for Nautilus.

You can install this utility by running the following command:

sudo apt install nautilus-image-converter

Open A Custom Terminal Window

By default, Nautilus allows you to open a Linux terminal at the current folder location through its context menu. However, it only does it for the Gnome Terminal emulator.

The nautilus-open-any-terminal utility solves this by extending the default “Open in Terminal” option to almost any emulator client.

To get this, open a new terminal and run the following command:

sudo apt install python3-nautilus python3-full gettext

Download the latest release file from the developer’s Github page.

A screenshot showing the latest download file for nautilus-open-any-terminal extension.

Open a new terminal window on your Downloads folder, then extract the contents of the extension’s zip file:

unzip ./nautilus-open-any-terminal-0.5.0.zip

Go inside the extension’s folder, then run the installer script:

sh ./tools/update-extension-user.sh install
glib-compile-schemas ~/.local/share/glib-2.0/schemas/

Run the following list commands to set a new custom terminal shell. In my case, I will adjust the terminal value to “urxvt” since it’s the terminal that I use.

gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal urxvt

Reload your Nautilus instance to apply your new settings.

A screenshot showing the new terminal option in Nautilus.

Enable Path Copying in Nautilus

For the most part, selecting and copying a file in most file managers will usually result in copying that exact file. However, there are instances where you want to copy some metadata for that file.

In Nautilus, it is possible to do this by installing nautilus-copy-path. This is a small extension that adds three new types of copy action: “Path, URI, and Name” on the file manager’s context menu. It’s also configurable and comes with keyboard shortcuts to automate actions.

To install this, run the following command to obtain the dependencies for the utility:

sudo apt install python3-nautilus python3-gi git make

Fetch the Git repository from the developer’s Github page:

git clone https://github.com/chr314/nautilus-copy-path.git
cd ./nautilus-copy-path

Navigate to the extension’s directory, then run the following command:

Check whether your new extension is working by opening a context menu on a file.

A screenshot showing the various copy options for Nautilus.

Actions For Nautilus is a powerful extension that enables you to create custom menus, submenus, and commands for Nautilus in Linux. You can even create custom behavior depending on the type and number of the currently selected files.

Further, Actions for Nautilus also comes with a GUI tool which makes it incredibly easy to configure and get started with.

A screenshot showing the Actions for Nautilus config page.

To obtain Actions for Nautilus, go to the project’s Github page and download the latest .deb package for the extension.

A screenshot showing the latest release for Actions for Nautilus..

Once done, open a new terminal session, then navigate to your Downloads folder:

Get the optional dependencies for the extension from apt:

sudo apt install zenity xclip

Install the Actions for Nautilus utility by running dpkg on the .deb package:

sudo dpkg -i ./actions-for-nautilus_1.6.1_all.deb

Reload your Nautilus session to enable your new extension:

Run Custom Scripts for Nautilus

It is also possible to run custom shell scripts directly from Nautilus. Unlike Actions for Nautilus, this native feature doesn’t have any GUI support nor a more granular way of filtering through file listings. Regardless, this can still be a handy way of adding custom actions if you don’t want to install third-party extensions.

To start, open a new terminal and navigate to the custom scripts directory for Nautilus:

cd ~/.local/share/nautilus/scripts

Create a new shell script file using your favorite text editor:

Paste the following code inside your new script file:

#!/bin/bash
gnome-terminal -e "nano $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"

Save your file, then set its permissions bits to execute using chmod:

Reload Nautilus to apply your new script:

Test whether the script is working by right-clicking a file, then selecting your script under the “Scripts” submenu.

A screenshot showing the new Scripts menu for Nautilus.

Learning how to tweak and use extensions in Nautilus is just the first in configuring Gnome. Discover more customization options for your desktop by looking at some of the best Gnome Shell Extensions today.

Image credit: ThisisEngineering RAEng via Unsplash (Background) and Wikimedia Commons (Logo). All alterations and screenshots by Ramces Red.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Ramces Red

Ramces is a technology writer that lived with computers all his life. A prolific reader and a student of Anthropology, he is an eccentric character that writes articles about Linux and anything *nix.

Leave a Reply

Your email address will not be published. Required fields are marked *