To retain
- There are certain Linux commands that I consider essential.
- These orders range from networking to troubleshooting, including the file display.
- They are also easy to learn for new users.
Although I have been using Linux for decades and I am perfectly comfortable with the command line, I often say to those who plan to try the open-source operating system that it is not necessary. This is not the case. Really.
If I wanted, I could completely abandon the command line. Of course, I should find applications to replace some of the orders I use. But it is possible. What orders should I replace? Well, these are the orders that it would be difficult for me to do without.
If you are curious to know what these orders are (because you may want to know them yourself), continue to read.
1. SSH
Without the slightest hesitation, it was this order that came to my mind first. For what ? I regularly need to connect in SSH to distant systems to perform certain tasks.
Yes, I know that it means that I always use commands (on the remote machine), so my argument that we can do without the terminal stops there. But these are special cases whose new users of Linux will not have to worry (that is to say the administration of a remote server).
SSH is one of those orders that I use every day, throughout the day. Without SSH, certain situations would not be possible, which is why this order is absolutely essential and is at the top of the list of commands that I cannot do without.
2. chmod
I write bash scripts to automate tasks and do other things. After writing a script, one of the first things I do is to give it permission to be executed with the help of Chmod.
With the command Chmod U+x File nameI can then execute this command with ./ File. I can even move this script in/usr/local/bin and execute it anywhere (and without ./). Yes, I can do the same with certain file managers, but it is easier to give these bash scripts execution authorizations from the command line.
Of course, Chmod is not limited to giving execution rights to a file. You can also manage file reading and writing rights, which is very practical (especially when you are on a machine where several users connect).
3. kill/killall
I don’t like having to invoke Kill or Killall commands, but when an application has taken a bad fold, it is essential. When an application does not respond, it is generally because it engulfs the resources of the system.
If this application consumes all the rest of your CPU/RAM, your system may no longer respond, which can cause brutal restart or force you to take measures to prevent such an act.
Before it happens, I will use the Kill or Killall command to avoid such a situation. I’m not saying that I use these two tools every day, but when something is wrong with an application, these two commands are essential to regain control of my computer.
4. Dmesg
This is another order that I consider essential when things go wrong. DMESG displays the messages relating to the nucleus which are recovered in the circular stamp of the nucleus. The information it provides makes it possible to repair the errors related to the equipment.
This command is the first place to which I turn when I think that a piece of equipment is broken down or having problems, because it keeps an eye on system errors, peripheral errors and information on connected USB devices.
You will not solve the problems related to software with DMESG, but when it comes to hardware, DMESG is difficult to beat. Keep in mind that the DMESG command requires administrator privileges to be executed, so use it with Sudo.
5. grep
When I need to see the content of a file and search for a character string, I always turn to Grep. With GREP, I can easily find what I am looking for in the configuration files or any other type of text file.
This is particularly practical when a file is long enough for manual search for a character string to be a chore. With GREP, I can quickly find this chain (or all the occurrences of this chain).
The GREP command is one of those that you may not use every day, but you will be very happy that it is there when the time has come to use it. I go out the files all the time, and you should do the same.
6. ping
When I have a network problem with a Linux computer, the first thing I turn is a ping. Not only can I check that my network connection is still working, but I can also check the ping times.
If ping times are too high, there may be a problem with the DNS or my bridge. If I make a ping on a computer of my local network and the ping times are normal, I can then exclude material problems on my computer and focus on the DNS. I can then change my DNS servers, perform a new ping test and see if it can help.
And as a ping is easy to use (aka ping google.com), you don’t have to worry about learning complex controls or using all kinds of fanciful options. Sometimes, when I help out a network connection (in particular a bottleneck), I leave the ping command run while I try to solve the problem. When the ping returns (or the ping times come back to normal), I most likely solve the problem.