Date
Sep. 8th, 2024
 
2024年 8月 6日

Post: Command that Terminal

Command that Terminal

Published 12:11 Nov 22, 2013.

Created by @ezra. Categorized in #Programming, and tagged as #iOS.

Source format: Markdown

Table of Content

In case somebody else is using the left and right arrows to navigate through typed commands, I've compiled a list of useful shortcuts for the Terminal:

  • Ctrl + A: Go to the beginning of the line.
  • Ctrl + E: Go to the end of line.
  • Ctrl + F: Move the cursor position one space forward.
  • Ctrl + B: Move the cursor position one space backward.
  • Alt + F: Move the cursor position one word forward.
  • Alt + B: Move the cursor position one word backward.
  • Ctrl + U: Clear the line before the cursor.
  • Ctrl + K: Clear the line after the cursor.
  • Alt + Del: Delete the word before the cursor.
  • Alt + D: Delete the word after the cursor.
  • Tab: Auto-complete file and directory names.
  • Ctrl + L: Clears the screen (same result as typing the clear command).
  • Ctrl + C: Terminate the running program; a timeless classic.

Edit: As noted by Parker Wightman (@parkerwightman), these same key bindings work in nearly every OSX text field.

As I grow older I found myself more and more comfortable working from the OSX Terminal, but I was annoyed by the "missing commands to navigate through the text"... Until I discovered them recently and my mind was blown.

Hope they are useful for somebody else too.

Pinned Message
HOTODOGO
The Founder and CEO of Infeca Technology.
Developer, Designer, Blogger.
Big fan of Apple, Love of colour.
Feel free to contact me.
反曲点科技创始人和首席执行官。
程序猿、设计师、奇怪的博主。
苹果死忠、热爱色彩斑斓的世界。
如有意向请随时 与我联系