DEV Community

Cover image for Essential Shortcuts for Linux Terminal 2024 πŸ’₯
DevOps Descent
DevOps Descent

Posted on β€’ Edited on

71 3 4 4 4

Essential Shortcuts for Linux Terminal 2024 πŸ’₯

Master key πŸ”‘ Linux πŸ’» shortcuts to streamline your workflow and boost command-line efficiency in 2024. From navigation to process management, these shortcuts enhance productivity and make terminal tasks smoother.

Essential Linux Shortcuts for 2024

Image description

Terminal Navigation Shortcuts πŸ’»

  • Ctrl + A – Move cursor to the beginning of the line.
  • Ctrl + E – Move cursor to the end of the line.
  • Ctrl + U – Cut everything from the cursor to the beginning of the line.
  • Ctrl + K – Cut everything from the cursor to the end of the line.
  • Ctrl + W – Delete the word before the cursor.
  • Alt + B – Move cursor backward by one word.
  • Alt + F – Move cursor forward by one word.
  • Ctrl + Y – Paste the last cut text.

Image description

Command History Shortcuts

  • Ctrl + R – Reverse search in command history.
  • Ctrl + G – Exit from history searching mode.
  • !! – Repeat the last command.
  • !n – Run the command with line number n from history.
  • !string – Run the last command starting with "string."

Image description

Process Management Shortcuts

  • Ctrl + Z – Suspend the current process.
  • Ctrl + C – Kill the current process.
  • Ctrl + D – Logout or end the terminal session.
  • jobs – List all running jobs in the background.
  • fg – Bring a background job to the foreground.
  • bg – Resume a suspended job in the background.

Image description

File and Directory Management Shortcuts

  • Tab – Autocomplete file or directory names.
  • Alt + . – Insert the last argument of the previous command.
  • Ctrl + L – Clear the screen (similar to clear command).
  • !! > file.txt – Repeat the last command and redirect output to a file.

Image description

Text Editing Shortcuts

Image description

  • Ctrl + Left/Right Arrow – Move left or right by one word in the line.
  • Ctrl + Backspace – Delete the previous word.
  • Ctrl + Shift + C – Copy selected text in the terminal.
  • Ctrl + Shift + V – Paste text into the terminal.
  • Shift + Insert – Paste text (alternative for Ctrl + Shift + V).

Image description

Miscellaneous

  • Ctrl + S – Freeze the terminal output.
  • Ctrl + Q – Resume terminal output after freezing.
  • Ctrl + T – Swap the last two characters before the cursor.
  • Ctrl + X, Ctrl + E – Open the current command in the default editor for easier editing.

Support if you found this helpfulπŸ˜‰

No Money πŸ™…πŸ»β€β™€οΈ just Subscribe to me YouTube channel.

Linktree Profile: https://linktr.ee/DevOps_Descent
GitHub: https://github.com/devopsdescent

Billboard image

Imagine monitoring that's actually built for developers

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (11)

Collapse
 
gahuber95 profile image
Gary Huber β€’

I've been using Linux for 30 years, and I never knew of these shortcuts, although they appear to be same as in emacs. Thanks!

Collapse
 
randodevguy profile image
Rando DevGuy β€’

They are emacs keybindings. In bash, they are active when the environment variableEDITOR=emacs or FCEDIT=emacs, or set -o emacs has been run. There is also a set of vi compatible keybindings, used when set -o vi has been run.
See "man bash" then search for "Readline Key Bindings".

Collapse
 
devops_descent profile image
DevOps Descent β€’

Well, I hope these will make help you somewhere 🧘

Collapse
 
david_j_eddy profile image
David J Eddy β€’

Super helpful, earned my YT sub.

Collapse
 
devops_descent profile image
DevOps Descent β€’

Thanks πŸ₯°

Collapse
 
ddivyasharma profile image
DdivyaSharma β€’

Thanks for this! I’ll try freezing the terminal before leaving my desk so no one can show their creativity on it πŸ˜†

Collapse
 
devops_descent profile image
DevOps Descent β€’

Hope it will be fun.πŸ˜„

Collapse
 
luis_gamurillo_e826946fb profile image
luis ga murillo β€’

Todos muy lindos pero ninguno para abrir la terminal?

Collapse
 
devops_descent profile image
DevOps Descent β€’

Los atajos son para quienes saben cΓ³mo usar Linux.πŸ˜„

Collapse
 
skuarch profile image
Alfredo Bello β€’

subscribed, thanks!

Collapse
 
devops_descent profile image
DevOps Descent β€’

Thanks for the support πŸ€—

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay