Mac Book is becoming the first choice of developers for their development. It provides so efficient ways for development which will make you a productive engineer. If you will know some keyboard shortcuts, it will boost your productivity to the next level. Today, let’s see Terminal shortcuts. I will post another article for other shortcuts.


Top


Typing “top” into Terminal will display all of your active processes. It’s pretty similar to Activity Monitor but within Terminal. You can quit it by pressing “Q” on the keyboard. It’s very helpful to get to know quickly about the running processes. If you developing web application then you might be interested in knowing the RAM consumed by your servers.

Control + D


If you want to exit the current shell in the Terminal, you can use this command. As a software engineer, you might be using multiple shells for different servers processes i.e. node server, react server etc and you can close those shells using this command.

Control + R


Typing long commands, again and again, is a tedious process. You can use the previously used command by pressing Control and R on the keyboard. It will open up search by [(reverse-i-search)`’:]. You can type a few characters of the previously used command and it will pick up it. It’s a very powerful shortcut when you need to execute long commands i.e. remote server connection commands etc.

Command + A


Using this shortcut, you can quickly go to the end, or the far right, of the line where your cursor is.

Command + E


If you want the opposite effect then the above command i.e. going to the beginning, or the far left, of the line you are currently working on, this command will be helpful.

Option/Alt + Left or Right


This shortcut will help you to move the cursor between separate words in a command line. You can use Option + the left arrow to move back and use Option + the right arrow to move forward down the line. This is a very helpful command to traverse in the command line.

Control + W


This shortcut will allow you to delete the word immediately before, or to the left of, the cursor. Rather using backspace multiple time, use this keyboard combination to save lots of time.

Escape + T


This keyboard combination will swap the two words that appear immediately before the cursor. There is a command called rails server in Ruby on Rails framework. If you mistakenly typed the command as server rails then you can quickly correct it by pressing Escape and T on the keyboard.

Control + C


If you need to kill the currently running process in the terminal, you can abort it by Control and C in Terminal. Generally this command useful to kill the running server processes i.e. if you want to kill the rails server process started as mentioned above, you can use Control + C shortcut.

Control + U


Control + W shortcut will help you to delete one word as mention above but if you want to delete the entirety of the line before the cursor, you can use this shortcut. This is very helpful when you have typed some words then changed your mind. You can Control + U to delete the whole line by this shortcut.

Control + K


This keyboard combination will give you the opposite effect of Control + U command. This shortcut will delete the line that appears after the cursor. This will be very helpful when you will need to delete the latter half of a line.




Call To Action


I am running my two online courses. Join my master 4-week course on “Ignorance of Software Developer and How we can reduce its impact” by clicking HERE. If you are short on time then join my short course for “Practical Tips for Ruby on Rails” by clicking HERE. This course is for all the levels of programming. You will receive a PDF in your inbox once a week. It’s absolutely FREE!! Sign Up.

About Author


Mayurkumar is helping companies to take the stress out of software development and make their business shine. He has more than eight years of experience in designing and building scalable applications using different technologies.

mayurkumar