A beginner-friendly Linux troubleshooting tutorial in Docker teaches log inspection, file navigation, finding configs, fixing a PostgreSQL port mismatch, and editing permissions with Vim.
This video is a practical, beginner-friendly Linux troubleshooting tutorial run inside a Docker container, requiring no prior Docker knowledge. It walks through locating and inspecting application logs with commands like pwd, cd, ls, and grep, then shows how to filter and save relevant error lines using pipes and output redirection. The core debugging challenge involves finding a database configuration file with find, comparing it against a backup using diff, and discovering that the app is broken because it points to port 5433 while PostgreSQL runs on the default port 5432. The tutorial also covers essential file-permission fixes with chmod, editing configurations safely in Vim, and quitting read-only files without saving. After correcting the port, restarting the app and exiting the container confirms the host system, reinforcing the full workflow of navigating, filtering, editing, and securing files in a Linux environment.
uname, which confirms the operating system by returning Linux.▶ 3:39 Locate application logs by checking your current directory with pwd and moving to /var/log/application using cd, then use ls/ls -l to inspect files and their details.
▶ 6:23 Filter large log files by chaining commands with a pipe (|) and using grep, e.g., cat error.log | grep database, to display only relevant error lines.
▶ 7:19 Save filtered results for later by redirecting output with > into a new file (e.g., database-errors.txt), then verify the file exists and has content using ls -l and cat.
/root with cp database_errors.txt /root/db_errors.txt so it isn't lost when the application folder is cleared.grep "connection refused" database_errors.txt filters only the connection-refused errors, using quotes around the multi-word phrase so grep treats it as one search string.wc -l (e.g., grep "connection refused" database_errors.txt | wc -l) counts the total number of failed connection attempts.find for .conf files, then filtering with grep for “db” to isolate db.conf.diff command compares db.conf against db.conf.backup, revealing the exact change that broke the app.db.conf points to Port 5433, but PostgreSQL is running on its default Port 5432, so the app cannot connect.curl -I http://localhost:5432; success shows PostgreSQL is running, revealing the app is configured for the wrong port.vim; remember Vim has two modes — edit mode (enter with i) and navigation mode.Escape then type :q!.chmod uses numeric modes to set permissions for user, group, and others (e.g., 000, 444, 777, and 600 for root-only read/write).vim with i for insert mode, then Escape and :wq to save and quit after editing.:wq! (write and quit), then verify the edit is visible in the file.exit and confirm you’re back on the host machine using uname (shows Darwin).chmod for security.uname.ls -l, view them with cat, filter with grep and pipes, and save output with >.cp and filters/counts “connection refused” errors to identify database connection issues.curl, opens the config in Vim, and handles the read-only warning and Vim exit.ls -l, covers numeric permission modes, and changes permissions to enable editing.Load the full timestamped transcript on demand and click any time to jump in the video.