Linux Command Line Tips

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Create a Linode account to try this guide with a $ credit.
This credit will be applied to any valid services used during your first  days.

These are just a few of the many commands and tricks available in the Linux terminal. Visit our guide for a deeper introduction to Linux concepts.

Basic Linux Terminal Things to Know

  • Scroll through previous commands with the Up arrow on your keyboard. Press Enter to send the command.
  • Stop the current process and get back to the prompt: CTRL+C
  • Use the TAB key to autocomplete commands and file paths

Easy Ways to Fix or Undo Text in the Terminal

  • Jump left one word: ESC+B
  • Jump right one word: ESC+F
  • Jump to the beginning of the line: CTRL+A
  • Jump to the end of the line: CTRL+E
  • Delete the previous word: CTRL+W
  • Clear the entire line: CTRL+U

Quickly Find and Replace within the Last-Entered Command

This is especially useful for both fixing typos and re-running system commands.

In the following example, we correct the typo in the first line using the command in the second:

sudo apt update && sudp apt upgrade
^sudp^sudo

Use it to change the action in a system command:

sudo systemctl stop nginx.service
^stop^start

Redo the Previous Command with Sudo

sudo !!

Exit Vi(m)

Found your way into the Vi(m) editor?

  • To exit without saving: ESC then :q!
  • Save and exit: ESC then :wq

This page was originally published on


Your Feedback Is Important

Let us know if this guide was helpful to you.


Join the conversation.
Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.