Five small tips to improve your terminal skills that I've learned from my teammate.
- Change directory from root
- Line navigation
- Remove the line
- Repeat the previous command with
sudo
- 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
Top comments (0)