Linux® is known for its stability, which is why a large number of servers worldwide run on it. If it is set up correctly, a machine running Linux® should never crash, but the issue is to set it up and maintain it correctly, which can be difficult. The best Linux® troubleshooting tips include knowing how to use a few specific commands — "top," "killall," "chmod" and "sudo" — as well as how to use a rescue compact disc (CD).
The first two commands someone wanting to do Linux® troubleshooting should be acquainted with are the "top" command and the "killall" command. The top command will display all of the processes that are being run on the machine. The user will then be able to determine which process is consuming the most system resources at any given time. The process can be be tweaked or, if the process is not necessary, it can be stopped by using the "killall" command and the process name.
This also can be achieved using a graphical user interface (GUI) tool such as process manager in most Linux® distributions. If the Linux® machine is running a server, usage of GUI tools and the X Windows system in general should be minimized. This is because they are hardware intensive.
Another important command for Linux® troubleshooting is the "chmod" command, which can be used to specify file permissions. Often, a Linux® user will attempt to run a file and will receive a message stating that the file cannot be run. This is because the Linux® Operating System will generally not give users the permission to run files if it is outside of the user's home folder. "Chmod +x" can then be used to give executing permissions to the user. The "sudo" command can and sometimes must be used in conjunction with "chmod +x," as in "sudo chmod +x."
The "sudo" command temporary gives the user all permissions on a file. By using the "sudo" command, a user will be granted root or administrator permission to a file and will then be able to read, write, execute, move, copy and more. A trick for beginners who are not comfortable with the command line is to simply launch the graphical file manager as "sudo."
Another important tool that users can take advantage of in Linux® troubleshooting is a rescue or live CD. A rescue CD can be used to access the command line or even a graphical interface if a Linux® installation becomes inaccessible. Troubleshooting can then be done from the Linux® Operating System running directly from the CD.