Linux is the most underrated operating system and it could not make as big an impact as Windows has. It is due to the fact that people are used to Windows and they are reluctant to make the transition. But there are a lot of people who prefer and use Linux over Windows in their daily lives. If you are one of those persons, we have some time-saving tips for you that you must know and apply in your interaction with the operating system.
Time-Saving Tips –
Learn Bash – The bash is the most time-saving tool in Linux. It is like the command prompt of Windows. It is currently the standard shell that most of the users use regularly. It is designed to make things easy for savage Linux users. There are various commands available to perform long and complicated actions with a couple of lines of shell commands. Therefore, the first thing you should do to save time on Linux is the learn Bash as much as possible and there are many commands we have listed before to execute tasks in the splash of an eye. It is more powerful and effective in comparison to alternative shells like zsh, fish, tcsh and likewise.
- Switching Windows –
In Windows OS, you need to press Alt+Tab Key or Win+Tab keys to jump from one window to another that is open. In Linux, you can do similar things. As you might know that in Linux, the opened windows are labeled from zero. If you have two to three windows open, you can jump among them with Ctrl-a 0, Ctrl-a 1 and likewise.
- Auto-completion –
Auto-completion is a great way to save time in typing what is in your mind. We use it already in multiple messaging apps. You can do the same in Linux terminal. All you have to do is hit the tab key after typing something and you will get all the possible options for the string you have typed. If you get used to it, you will save a lot of time in the long run and it will also save you from errors.
- Copying Pasting –
The copying and pasting feature is different for different terminal applications and without copy-pasting, a lot of time is sure to be lost. Therefore, you should try out different combinations to see which one works for that particular terminal application.
The first thing to try is the usual Ctrl+Shift+C for copying and Ctrl+Shift+V for pasting. If this one does not work, try to select the text for copying and right click for pasting. Some terminals have the option to select the text for copy and using the middle click for pasting. Anyone of these must work.
- Debugging –
It is a known fact that debugging takes as much as the time it takes for development. That is why companies have dedicated testers to find out the bugs. Fortunately, Linux has the command named alias which helps to avoid typing errors. If you are prone to writing gerp instead of the command grep, you can use the alias command as follows.
- Reading Big Files –
We generally use the command cat to view a file. However, if the content of the file is large, you will find it difficult to read it with the cat command. This is because the entire file will be displayed on the screen. Instead, you can use Vi, Vim, various other terminal based text editors with the help of the less command. In fact, you should start learning VI and Vim if you are a programmer because they can overpower popular text editors like Eclipse by far.
- Searching Deeper –
It is easy to search a file when you know a part of the file’s name even though there could be multiple files with similar names. However, at times, we fail to recollect the name of the file but we remember the part of the content that is inside the file. On Linux, you can search a file by a particular text using the following command.
grep -Pri search_content path_to_directory
- When Confused –
A lot of time in human life is wasted by thinking and guessing when they could have asked for help. Luckily, on Linux, you get a command named help and you can place it before any command you have a doubt on before executing. There are help pages for almost all commands and you do not have to check online and go through multiple pages to understand the usage and benefits of the commands.
If the terminal has frozen by mistake for pressing Ctrl+S, you can unfreeze it by pressing Ctrl+Q. If you want to search for anything from the past, you can use the command Ctrl+r for reverse searching. Not many people know that they can run multiple commands in a single line with && operator.
There are multiple such shortcuts and time-saving tips you will find online and you need to start implementing them to fall in love with Linux.