In Ubuntu's (and other Linux systems) terminal, CTRL+x+e, which opens an editor to allow you to edit your command at leisure, with multiline support, and once you save and exit, it would return to terminal with the full command ready to execute.

I've tried the same combination in Terminal (both with Cmd and CTRL) and it didn't do anything.

Googling the combination + macOS just gave me random tutorials about useful keyboard shortcuts in terminal and in macOS in general.

Does anyone know of the equivalent key combination for the MacOS Terminal? Does it even exist?


Control+X+E works on the macOS Terminal. Generally CTRL is not substituted for Cmd in terminal commands.

  • Equivalent in vi-mode: press letter v – Yoric Jan 6 '19 at 16:15
  • 2
    Yes but note this is not a property of terminal but if the shell you are using so default is bash and it works but not with other shells – mmmmmm Jan 6 '19 at 16:51
  • 1
    @Mark Seems to work with zsh as well at the very least. – Madara's Ghost Jan 6 '19 at 18:11
  • Try tcsh (and xonsh is a bit buggy ie it should work but does not) – mmmmmm Jan 6 '19 at 18:34
  • 1
    @Noumenon just checked and this still works for me (on zsh on mac) – Benjamin Gruenbaum May 1 at 15:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .