When using nano in the terminal, to do the "write file append" command, it lists the keystroke "M-A".

I am completely confused what this key command actually means. I read somewhere that it means Alt-A, which didn't work.

What am I supposed to use?

EDIT: I think the problem is because when I hit Alt-A, it opens my Xubuntu terminal windows Menu > Tabs menu item.

So by default the supplied xubuntu / xfce terminal has hotkeys that step on nano's hotkeys? Is this correct or have I modified them and forgot?

  • 1
    "didn't work" how exactly? Alt-A should be the right interpretation - the slightly confusing thing is that the keymapping only applies in the "write screen" (i.e. after you've hit Ctrl-O). In regular edit mode, M-A (Alt-A) sets a mark in the text. Mar 18, 2017 at 22:23
  • 2
    Try esc then A instead. Mar 18, 2017 at 23:51

2 Answers 2


M-A means ALT+A. But that does not directly appends the contents to the file selected.

ALT+A toggles the mode of modification of file between "write to file" and "append to file" as shown in the following images.

File name to write to

File name to append to

After you toggle to the desired command, press Enter.
This will append the contents to the file.

  • 3
    Why use "M" in the hints? Wouldn't be more logical to use "A"?
    – Gustavo
    Sep 21, 2019 at 17:57

A test example using the append write file output option.
Starting conditions:

doug@s15:~$ cat cccc
this is file cccc.
doug@s15:~$ cat bbbb
this is file bbbb.

Now, nano cccc, and then Ctrl+O, followed by CTRL+X, followed by Esc then A but change this:

File Name to Append to: cccc

To this:

File Name to Append to: bbbb

And then Enter followed by CTRL+X
See this:

doug@s15:~$ cat bbbb
this is file bbbb.
this is file cccc.

Note: There are other key combinations to achieve the same end result. See the help file within nano, a segment extracted below:

 The notation for shortcuts is as follows: Control-key sequences are
 notated with a caret (^) symbol and can be entered either by using the
 Control (Ctrl) key or pressing the Escape (Esc) key twice.  Escape-key
 sequences are notated with the Meta (M-) symbol and can be entered using
 either the Esc, Alt, or Meta key depending on your keyboard setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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