

Sometimes you want to remove only certain words from the command. Note the cursor point and see the outputs beneath to clarify the difference between these two shortcuts. While if you want to remove anything that comes after the cursor point, you have to use the Ctrl+K shortcut. You can press Ctrl+U to remove everything from the beginning to the cursor point. Following are some shortcuts that can help with this problem. Using backspace in the terminal is the bane of existence for every Linux user. Similarly, You can press Ctrl+E to jump the cursor to the end of the line/command.Įdit the Commands Effectively With Terminal Shortcuts Press Ctrl+A to move the cursor directly to the front of the line. But now, you can move your cursor with a simple shortcut. Navigate the Cursor With Ctrl+A and Ctrl+EĬurrently, you have to use arrows to move the cursor, which is frustrating. But keep in mind if you have any process still in the background, You will need to use this shortcut twice, as shown in the output here. Press Ctrl+D to log out or close the terminal. If you have been using the clear command every time to clear your terminal window, Now press Ctrl+L when you need a clear window. Please note that in some Linux systems, you can do the same with the arrow key buttons.


Similarly, You can backtrack and Press Ctrl+N to see the next run command. You can Press Ctrl+P to see the previously run command in the terminal. Navigate Through Past Commands in the Terminal With Ctrl+P and Ctrl+N If you only remember a partial command or want to autocomplete your command, press the tab button to see the available options. Recall/Autocomplete Past Commands in the Terminal With Tab All the methods in the tutorial are valid for any Linux-based system. Note: The commands in this tutorial are executed on the Ubuntu 20.04 system. For example, Ctrl+C is equivalent to ctrl+c. Note: All the commands in this article are written in capital for formatting sake so you do not need press shift while executing them. In this article, you will learn terminal shortcuts that are convenient and will boost your work efficiency in the terminal by leaps and bounds. But the terminal is manual and can be difficult to use, especially if you have transitioned from another operating system. You can not enjoy the full range of control and benefits, Linux operating system has to offer without the Command-Line interface or terminal.
