/etc
Cheat sheet · https://pcornel.dk/topic.php?topic=2663
Answer
/etc holds system-wide configuration files: services, users (passwd, shadow), networking, fstab, cron and more.
Remember
Back up a file before editing; many services validate their config (sshd -t, nginx -t). Package updates may leave new defaults as .dpkg-dist or .rpmnew files next to your edited one — compare them.
First checks
ls -ld <path>— owner, permissions and typestat <path>— inode, links, size and timestampsdf -h <path>— filesystem and free spacefindmnt <path>— which mount the path is on
Verify in this order
/etc mounted (or virtual) → correct owner and permissions → enough space → services read and write as intended
Where it usually breaks
First mismatch in hardware/block device → kernel driver/mapper/RAID/LVM → filesystem → mount namespace/options → path permissions/MAC → consumer I/O; preserve identity/native diagnostic/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2663