Share This
//Linux Terminal Productivity Tips

Linux Terminal Productivity Tips

Introduction

Working in the Terminal is a completely different experience compared to GUI environments like Windows. There’s no drag and drop, no mouse pointer to select files or folders — only a command line on a black screen.

However, this simplicity offers powerful and efficient control over the system. Using the Terminal saves time and handles complex tasks more effectively. This article shares practical tips to help you work more easily and efficiently with the Terminal.

Keyboard Shortcuts

In both Terminal and GUI environments, using keyboard shortcuts significantly boosts your productivity. The shortcuts below are some of the most useful in Terminal:

Ctrl + Z (pause/suspend)

This shortcut suspends the currently running process (without terminating it). It is especially helpful when combined with the bg command to continue running in the background. Works well with commands like mysqldump, mysqlcheck, etc.

Ctrl + L (clear screen)

Clears the current Terminal view by scrolling the screen up. Unlike the clear command, this shortcut has several advantages:

  • Faster: No need to type clear and press Enter.
  • Preserves history: Unlike clear, it doesn’t affect command history.
  • Doesn’t erase the current command: Your current input remains intact.
  • Works across many CLI environments.

clear screen shortcut

!! + Enter

The !! shortcut reruns the last executed command. It’s especially useful when you forget to use sudo:
Instead of using the arrow keys and editing manually, just type sudo !!.
!! shortchut

Other Useful Shortcuts

ShortcutDescription
Ctrl + AMove cursor to the beginning of the line.
Ctrl + EMove cursor to the end of the line.
Alt + FMove cursor forward one word.
Alt + BMove cursor backward one word.
Ctrl + FMove cursor forward one character.
Ctrl + BMove cursor backward one character.
Ctrl + UCut everything before the cursor.
Ctrl + KCut everything after the cursor.
Ctrl + WCut the word before the cursor.
Ctrl + YPaste the last cut content.
Ctrl + RSearch command history.

Useful Commands

Mastering Linux means being familiar with its commands. Let’s explore a few essential and commonly used commands:

grep Command

grep [options] [patterns] [files]

The grep command searches for matching text within files or command output (stdout).

Search in a file

grep 'about-us' /var/log/nginx/access.log

Searches for lines containing ‘about-us’ in the access.log file.

Wildcard search

grep 'about-us' /var/log/nginx/access-*.log

Searches for ‘about-us’ across all access-*.log files.

Search in command output (STDOUT)

ps -aux | grep php

Filters the process list for running PHP processes.

Show line numbers

grep -n 'about-us' /var/log/nginx/access.log

Displays matching lines along with their line numbers.

Count matches

grep -c 'google' /var/log/nginx/access.log

Counts the number of matches for ‘google’.

tee Command

Sometimes, you may want to view output on screen and also save it to a file for later analysis.

Output and save to file

find . -name '*.xml' | tee ./files.txt

Save to multiple files

find . -name '*.xml' | tee ./main.txt ./backup.txt

Pipe (|)

Pipes are not commands but a way to redirect output (STDOUT) from one command as input (STDIN) to another.

ps -aux | grep php

Instead of displaying output directly, the pipe sends it to grep for filtering PHP processes.

Benefits of pipe:

  • Simplifies data processing (no need for intermediate files).
  • Reduces system resources.
  • Saves time.

Conclusion

Mastering the Linux Terminal is an essential skill for any developer. It boosts speed, accuracy, and efficiency while enabling advanced customization and automation.

This article shared useful shortcuts, commands, and practical insights to help you work more effectively in Terminal.

Vũ Khắc Nguyễn
Developer

APPLY NOW






    Benefits

    SALARY & BONUS POLICY

    RiverCrane Vietnam sympathizes staffs' innermost feelings and desires and set up termly salary review policy. Performance evaluation is conducted in June and December and salary change is conducted in January and July every year. Besides, outstanding staffs receive bonus for their achievements periodically (monthly, yearly).

    TRAINING IN JAPAN

    In order to broaden staffs' view about technologies over the world, RiverCrane Vietnam set up policy to send staffs to Japan for study. Moreover, the engineers can develop their career paths in technical or management fields.

    ANNUAL COMPANY TRIP

    Not only bringing chances to the staffs for their challenging, Rivercrane Vietnam also excites them with interesting annual trips. Exciting Gala Dinner with team building games will make the members of Rivercrane connected closer.

    COMPANY'S EVENTS

    Activities such as Team Building, Company Building, Family Building, Summer Holiday, Mid-Autum Festival, etc. will be the moments worthy of remembrance for each individual in the project or the pride when one introduces the company to his or her family, and shares the message "We are One".

    INSURANCE

    Rivercrane Vietnam ensures social insurance, medical insurance and unemployment insurance for staffs. The company commits to support staffs for any procedures regarding these insurances. In addition, other insurance policies are taken into consideration and under review.

    OTHER BENEFITS

    Support budget for activities related to education, entertainment and sports. Support fee for purchasing technical books. Support fee for getting engineering or language certificates. Support fee for joining courses regarding technical management. Other supports following company's policy, etc.

    © 2012 RiverCrane Vietnam. All rights reserved.

    Close