I would like to to have a "create new document" option in the right-click menu.

Currently it looks like this :

enter image description here

I am using Ubuntu GNOME 16.04 LTS with GNOME 3.20.


This functionality has been removed from Nautilus 3.20 (either by error or on purpose). There is a bug report on it here. If it turns out to be a bug it will be fixed upstream and then will either be back in 3.22 or backported into 3.20, or if this has been done on purpose then as you can see from the LP bug report they are wanting to make it a distro specific patch.

  1. See if you have ~/Templates folder2. Create one if it is missing using command:

    mkdir ~/Templates
  2. Now create an empty file from command prompt:1

    touch ~/Templates/Text\ File.txt

The "Create Document" option is back again and you can create a new text file or a new document.

1 The backslash is used to tell the shell that the space following it is part of the filename. Since the shell recognizes spaces as delimiters between commands/options/arguments, unless you "quote it", 'quote it', or quote\ it, the shell will treat whatever comes after the space as a separate argument.

2 The ~/Templates folder is localized, change his name accordingly to your localization (ex: ~/Modèles for French localization).

  • 2
    \ this is because of file name contains space you can use "" – HMagdy Dec 22 '16 at 9:25
  • 6
    this is coolest thing I have ever seen in linux. I got more reasons to use it. – Parnab Sanyal Apr 19 '17 at 10:22
  • 1
    I had no problems with 16.04, recently I upgraded to 17.04 and option is GONE. help. – Luka May 1 '17 at 19:01
  • 11
    This should be the correct answer – Matteo Jun 14 '17 at 12:57
  • 3
    @HassanMagdySaad Upon creation for every file without needing to manually rename it afterwards. This is how it works on MS Windows for any new file or folder with the right-click-menu. Thanks – Roey Jan 8 '18 at 10:43

You can go into your ~/Templates folder and create templates yourself, then they will appear in the right-click menu. For example:

cd Templates

touch Filename.txt
  • I have the ~/Templates folder and created a newFile.txt there via CLI. still no new file entry in context menu. still does not work for me somehow on ubuntu 18.10 – Axel Werner Mar 24 at 12:53
  • Please change the permission for this folder and file – Naveen Mar 25 at 8:47

It seems like when the templates folder is empty this option is disabled. The simplest fix for this problem is to create a file in the templates folder:

touch `xdg-user-dir TEMPLATES`/Empty\ Text\ File.txt

It's definitely a bug as stated.

  • nice hint about that "xdg-user-dir" tool. it showed me, that my TEMPLATE Variable/Folder/Setting was set to my $HOME only somehow. NOT to my Template folder. However even if i reset this setting to $HOME/Templates it didnt worked for me so far on Ubuntu 18.10 . – Axel Werner Mar 24 at 12:56

this method didn't quite work for me, items in the Templates folder weren't showing up in the context menu. something needed to be restored about how the system identifies and uses the Templates folder.

to fix this, i installed ubuntu tweak like so:

wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu xenial-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'
sudo apt-get update
sudo apt-get install ubuntu-tweak

and then used this method, namely, delete your Templates folder and then use this method to 'restore' the Templates folder, worked for me in 17.04 on a thinkpad t530:

How can I restore template functionality after having deleted the Templates folder in 12.10?


In the case you are using an ubuntu with a different language that english, first check where your Templates folder is.

vi ~/.config/user-dirs.dirs

And in this file, check for XDG_TEMPLATES_DIR=. In spanish for example you will have something like:


Then you can apply the solution listed in the other answers:

mkdir ~/Plantillas  (or the name listed before)
touch ~/Plantillas/Documento\ de\ Texto.txt

And that is all.

  • As the remarks in this configuration file states, these entries are set/updated by the ''xdg-user-dirs-update'' cli tool. So i did a ''xdg-user-dirs-update --set TEMPLATES ~/Templates'' to reset my Templates setting to the $HOME/Templates folder within my homedirectory. However... it still does not work for me somehow on ubuntu 18.10 . still no "new document" on my context menu. – Axel Werner Mar 24 at 12:59

protected by Community Nov 12 '17 at 11:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.