Skip to main content
edited tags
Link
emnha
  • 121
  • 4
Source Link
emnha
  • 121
  • 4

How to quickly edit commands in the Linux terminal?

If you've typed a command, especially a lengthy one, in a Linux terminal, and you want to delete one or more words and replace them with something else, is there a way to do this quickly within the terminal?

This isn't related to Linux specifically, but in applications like Notepad, you can select a word or words and delete them in a single step. However, as far as I know, in the terminal, I have to delete them letter by letter, which can be a slow process.

I'm aware that Vim can do this, but let's assume that I want to edit it directly in the terminal without opening it in Vim.