On an OS like Arch/EndeavourOS, it is the user error that is the biggest source of system instability.
In every case of my Arch or EndeavourOS systems breaking, it was my fault, 100% of time. I was careless and stupid and did something that broke my system (this is not the case with 'buntu, though). I have yet to experience a major OS breakage on Arch which wasn’t my fault, in the sense that I had no way of seeing it coming and couldn’t have prevented it by being less stupid.
So, the most general advice I have for system stability on Arch/EndeavourOS is: don’t be careless and stupid.
I know this is not very specific, so here are a few specific points (not an exhaustive list):
- Back up all important data. Verify that backups work, keep duplicate backups, keep backups on external media. Not doing so is the pinnacle of stupid.
- Don’t just copy-paste terminal commands from the internet not knowing what they do (that’s really stupid, almost as stupid as not having a backup).
- Whenever you type the word
sudo
into the terminal, let this be a cue for you to think twice about what you’re about to do. The three questions to ask yourself are: “What am I trying to do?”, “What am I actually doing?”, and “Why am I usingsudo
to do this?”. - Never use
sudo
with GUI applications. Never usesudo
with software-specific package managers likepip
,gem
,npm
… (on most distros you can do this, but on Arch this will cause you trouble). Never usesudo
withwine
(this is incredibly stupid!). Never dosudo bash
orsudo zsh
. Avoid usingsudo su
(except on a live image). Do not login as your root user in an interactive shell (unless your system is utterly broken and you know exactly what you’re doing). - In general, never use
sudo
when you can do the same task withoutsudo
. - When you are in doubt, ask on the forum. Even asking a stupid question is less stupid than not asking it and doing a stupid thing. Read the forum topics about other people having problems and what the solutions are. Smart people learn from the mistakes of others.
- Protect your
cp
,mv
andrm
commands with the-i
flag in your.bashrc
:
This will require you to confirm withalias cp="cp -i" alias mv="mv -i" alias rm="rm -i"
y
every time you’re about overwrite or delete a file. When you have a lot of files to delete, you can override this with the-f
flag manually (which also forces you to think about what you’re about to do). Also consider turning off redirection clobbering:
In my specific case, this has prevented about 90% of all my terminal accidents due to carelessness.set -o noclobber
- Before doing something you don’t have a lot of experience with, think about it and plan it. Know what you want to do and how to do it in advance. Take the time to read the manpages and/or ArchWiki, whenever you’re about to enter uncharted territory.
- On the flip side, whenever you’re doing routine system maintenance and things you’re very comfortable doing and have a lot of experience with, resist the urge to be on autopilot. Do your best to pay attention to what’s going on. When updating your system, do not walk away from the keyboard. Never ignore error messages and warnings.
- Don’t use a GUI package manager (that’s stupid).
- Do not use the power and reset switches on your computer case to reboot your computer, even if it is completely frozen. Learn about the magic SysRq key. This will prevent filesystem corruptions due to hard reset.