In order to keep your Linux system running smoothly, it is vital to maintain it properly.
To create partitions, you use fdisk or mkfs. To verify disk integrity, use the fsck command.
You use the cron command to schedule tasks. Make sure you know how it works before passing the test. The man cron output will tell you all you need to know about it.
To view network statistics and configuration, use the ifconfig command.
System Maintenance and Updates
Most Linux distributions like RedHat have automatic update systems now. However, you should know how to use the rpm or tgz command to install downloaded packages in case of a problem. The patches are generally available from your distribution’s website.
To view which processes are running, use the ps command. Generally you will type ps –A (capital A – remember that linux is case sensitive!)
To kill a process, enter the kill command followed by the process ID (or PID). Usekillall to kill all processes.
Backup and Restore
Backing up a Linux machine is vital. A lot of third party software exists and can make this process easier. Building a backup script is possible but not always recommended since it can represent a lot of work.
Maintenance Good Practices
As with any other operating system, you should always develop good habits while doing maintenance. More specifically, you should look at the following:
- Document the work performed on your Linux system
- Regularly monitor the log files. Verify errors and any unusual behavior.
- Verify backups and do restore tests.
- Perform and check security best practices: change passwords, disable unused resources and accounts, verify file permissions, isolate important files and lock them down with minimal permissions, do security audits if possible.
Also published on Medium.