DEV Community

Cover image for Become more productive with these 5 terminal tips
Nikita Hlopov for Visual Composer

Posted on • Updated on

Become more productive with these 5 terminal tips

Five small tips to improve your terminal skills that I've learned from my teammate.

  1. Change directory from root
  2. Line navigation
  3. Remove the line
  4. Repeat the previous command with sudo
  5. Suggestions with Tab button

1. Change directory from root

From any directory location in your terminal, you can start directory change from the root folder. Right after cd command add a Space and a / to begin change. E.g.:

cd /

and then:

cd /var/log/

2. Line navigation

Navigate through your line with ease. Either jump to the start and end of the line:

  • fn + shift(⇧) + - Jump to the start of the line
  • fn + shift(⇧) + - Jump to the end of the line

or jump by word:

  • alt(⌥) + - Jump to the previous word
  • alt(⌥) + - Jump to the next word

3. Remove the line

This command will remove all text in the current line and leave cursor blinking at the start:

ctrl(⌃) + u

4. Repeat the previous command with sudo

Very handy if you need to repeat the command with superuser permissions:

sudo !!

5. Suggestions with Tab button

Double-clicking on Tab button while writing a path to a file will show you suggestions (contents) of the directory. It comes in handy when you need to type in a long path.

That's it for now. Happy coding. 👩‍💻👨‍💻

Cover image via Unsplash by Goran Ivos

Discussion (0)