Ravindra BagaleCourses & study guides

Chapter 3: Linux Basic Commands

Common Mistakes I See Students Make

  • Typing cd /Home or Index.html. Linux paths are case-sensitive.
  • Using chmod 777 to fix every error. It is insecure and usually hides a wrong owner or SELinux label.
  • usermod -G without -a. This replaces all the user's groups instead of adding one — the user may lose sudo access.
  • Running everything as root with sudo -i and then creating files that the normal user or web server cannot edit.
  • Using apt on Amazon Linux or yum on Ubuntu. First check cat /etc/os-release.
  • Getting stuck in vim. Remember: Esc then :q!.
  • rm -rf with a wrong path. There is no recycle bin — read the command twice before pressing Enter.