Things to avoid on your Linux system
Linux is poweful—but one bad command can turn your day into a disaster, so here are the mistakes you should NEVER make 😎👆
Any other tips to share?
Find high-res pdf books with all my Linux and cybersecurity infographics at https://study-notes.org
Using Linux efficiently and safely is crucial, especially when a single command misuse can cause system-wide issues. One of the biggest pitfalls is interrupting system updates mid-way. For example, if your laptop battery dies or the update process halts unexpectedly during critical upgrades like glibc, your system may fail to boot or function properly. Always ensure your device is plugged in and has a stable power source before starting updates. Another common mistake is editing system configuration files without creating backups. Configuration files such as /etc/fstab, /etc/sshd_config, and /etc/sudoers control essential system behavior. A single typo can prevent your system from booting, block remote SSH access, or revoke your sudo rights, forcing difficult recovery steps, possibly late into the night with rescue tools. Avoid running scripts directly from the internet using commands like sudo curl http://example.com/script.sh | sudo sh. This practice grants root access to scripts without inspection, risking malware installation or system corruption. Instead, download scripts first, verify their integrity, and review their content before execution. File permission commands like chown and chmod require care—using wildcards carelessly may mistakenly change or expose sensitive files. Never run commands such as chmod -R 777 /, as this opens your entire system to security risks, potentially compromising system integrity. Removing USB drives immediately after file transfers can lead to data loss since data might still reside in the filesystem cache. Always unmount drives properly using umount or run the sync command to flush data before unplugging. The dd command is powerful but unforgiving. Incorrect device names or parameters can wipe disks irreversibly. Double-check input (if) and output (of) devices before running dd, and pause to confirm your intent. Running GUI applications with plain sudo can alter file ownership in your home directory or system folders, leading to permission conflicts. Use graphical sudo tools like gksu or kdesudo to prevent such issues. Avoid "sudo make install" when installing software from the source as it can overwrite critical files without easy rollback. Instead, use package management alternatives like checkinstall or containerized environments such as Docker. Finally, the rm command permanently deletes files with no recycle bin fallback. Extra caution is needed to prevent accidental data loss caused by wrong input or spacing errors. Tools like trash-cli or graphical file managers offer safer deletion alternatives. By following these guidelines and exercising caution with system commands, you can maintain a secure and stable Linux environment that avoids common pitfalls and minimizes downtime.









