People around the world tend to use Windows and macOS operating systems but Linux delivers the benefits of open-source. The flexibility of Linux is unmatched. Here are some useful basic tips of the Terminal for those who think of giving a shoot on Linux.
See the commands
Even if most of the Linux distributions have a visual user interface, the Terminal is still the heart of the operating system. For Windows and macOS users, it might be difficult to get used to. In this case, the apropos command will help you find what command you need. It simply lists the related commands in the Terminal based on your subject.
Update your software
Linux distributions generally come with an update manager. However, you might also want to check and install the updates by using the Terminal. With the first command, you will check the repositories if the software versions are newer than the ones installed on your machine or not. The second command starts the updating process by using the version information taken by the first command.
sudo apt-get update sudo apt-get upgrade
Turn your system off automatically
Like the old TVs, Linux operating system can also shut down itself if the user wishes. It works in two different ways. You can either set the exact time for shutting down or you can define minutes like a countdown with “+”. Here are the examples for both of them:
sudo shutdown 22:00 sudo shutdown +30
Repeating the last command
In the Terminal, sometimes you might need to use a command several times; mostly after changing something outside the Terminal. In such cases, repeating the last command might save you a lot of time. You can simply use the CTRL+R combination or use the very basic command you see below:
Autocomplete a command
This trick is not a specific one for Linux; even the developer consoles in the games have this as well. Pressing the TAB button on your keyboard while typing a command in the Terminal will automatically complete the command. As you press the TAB button again, different possible results will appear on the command line.
Easy home & and text cursor movement
You might need to edit a command line for several reasons in Linux Terminal. Moving the text cursor to the beginning, or the end of a line has many different ways. But one of the most efficient ways is using the Home and End buttons on the keyboard. In the Terminal, you can further increase the efficiency of moving the text cursor by using CTRL+A and CTRL+E, respectively.
Unfreeze the terminal
It became a habit to use CTRL+S on a text-based interface, thanks to Microsoft Office programs’ unreliable auto-save feature. You might find yourself doing the same in the Linux Terminal. However, this key combination is used for freezing the Terminal completely and it is completely normal. To unfreeze the Terminal, simply press CTRL+Q.