Best Practices for Linux – CompTIA A+ 220-1002 – 1.9


If you’re managing a Linux device, you’ll need to have the proper backups, provide disk maintenance, and keep the system updated. In this video, you’ll learn about some techniques to provide these functions in the Linux operating system.

<< Previous Video: macOS Features Next: Linux Tools >>


One of the advantages of Linux is that you can perform the same task in many different ways, and you can find the way that works best for you. For example, scheduling a backup in Linux can be done from the graphical interface or from the command line. And a number of these utilities are built into most distributions. For example, a utility that’s very commonly used to backup data is tar. Tar stands for Tape Archive. And although tape is in the name of the utility itself, tar will work with any storage device. It’s easy to script from the command line, and you can backup and restore using the tar utility.

Another common utility used for backups is rsync or remote sync. Rsync is designed to synchronize data between devices, and you can configure rsync to copy information instantly between devices, or you can schedule it to occur at a particular time of the day.

The Linux operating system doesn’t require any ongoing disk maintenance. As long as you keep enough free disk space to store your data, the Linux operating system tends to work just fine. But there may be times when you would like to perform a check of the file system and confirm that everything is working as expected.

To run this check, you need to make sure that the partition is not mounted. It’s very common to run this check during startup before the partitions are mounted into the operating system. This check is normally done after a certain number of reboots have occurred. But if your system doesn’t reboot often, you may want to force it to perform this check by performing a sudo touch /forcefsck. That is your file system consistency check. And the next time you reboot your system, it will perform this consistency check.

Another good maintenance task for Linux is to make sure that you have enough available drive space. We know that log files tend to take up a lot of space, so you may want to check and delete any of those old log files. Those are commonly kept in the /var/log directory.

As with any operating system, we want to be sure that we have the latest software running for our operating system and our applications. Depending on the Linux distribution you’re using, you would use a utility such as apt-get or yum to be able to perform those updates on your system.

If you’re running Linux with a graphical front end, you can also find a graphical update manager. Very commonly, these are called software updater that allows you to update the operating system and apps. These updates can also be scheduled. So if you’re doing patch management, or you have change control requirements, you can decide when the operating system performs these updates.

And if you’d like to view the applications that are installed, or you’d like to install new applications, you may have a software center in your Linux distribution. This would allow you to choose from categories of software to be able to install from one central application.

With Linux, many of the device drivers that are used are integrated with the kernel. So when you update the kernel, you’re also updating the device drivers. There may be cases where you need to install your own device driver, and many Linux distributions include a graphical front end to be able to make that process easier. You can also commonly install those device drivers from the command line within Linux as well.

Although you’ll find relatively few examples of viruses or malware compared to an operating system like Windows, a good best practice in Linux is to always protect your system from any type of attack. There are some third-party antivirus and anti-malware applications available. One common one for Linux is ClamAV, which is an open source antivirus engine.

And like with most operating systems, you want to be sure you’re using the latest signatures for your antivirus and your anti-malware. And if possible, you want to be sure that you’re using real-time virus scanning. That way you’ll know instantly if a virus or malware is identified by your antivirus engine.