Chapter 3: Linux Basic Commands
Common Mistakes I See Students Make
- Typing
cd /HomeorIndex.html. Linux paths are case-sensitive. - Using
chmod 777to fix every error. It is insecure and usually hides a wrong owner or SELinux label. usermod -Gwithout-a. This replaces all the user's groups instead of adding one — the user may lose sudo access.- Running everything as root with
sudo -iand then creating files that the normal user or web server cannot edit. - Using
apton Amazon Linux oryumon Ubuntu. First checkcat /etc/os-release. - Getting stuck in vim. Remember:
Escthen:q!. rm -rfwith a wrong path. There is no recycle bin — read the command twice before pressing Enter.