10 Terminal Shortcuts Developers Need to Know

There is plenty of web development software that a developer can try to help them work efficiently. However, knowing some of keywords combination will come in handy when it comes to fasten your work process. Below are 20 keyboard shortcuts on OS X that will make life easier if you’re working in terminal.

  • Option/Alt+Left or Right

Have you ever wondered what shortcut that allows you to move the cursor between separate words in a command line. Use option and the left arrow to move back and use option with the right arrow to move forward down the line.

  • Escape + T

You can use the combination keywords of Escape + T to swap the two words that appear immediately before the cursor.

  • Control + R

The combination of Control + R will locate a previously used command in Terminal since it will open up [(reverse-i-search)`’:] and allow you to find a previously used commands that you may need to access again.

  • Control + C

To abort the current application and kill what’s currently running, you can use Control and C.

  • Control + U

If you have worked until the end of a line and realize the whole line is wrong, don’t worry since you can clear the entirety of the line before the cursor by using control and U to delete it all.

  • Control + K

Control K works oppositely and produces the opposite effect from Control and U. This will clear the line that appears after the cursor which is helpful when you need to change or delete the latter half of a line.

  • Command + K

If you are looking for a combination button to delete everything you’re working on, the Command + K combination will clear it all or you can also use Control and L or by typing “clear” into terminal.

  • Control + Z

Control + Z is highly recommended when it comes to suspend what you are currently running in the background. This action will help to execute the last command entered. Bear in mind to try entering Sudo before, if you run into permission issues.

  • History + a Number

If you happen to lose track of a command you type earlier, you can type “history” into Terminal to retrieve a history of your commands or you can simply type a space then a number after history. Therefore, “history 5” will show you the last five commands you typed.

  • Escape + B

Try using an alternate way of moving the cursor back by one word through the combination of Escape + B, like you would do using the option and left arrow shortcut.

Mario:
Related Post