🛠️

Linux Troubleshooting Guide

Jun 16, 2025

Overview

This lecture provides a walkthrough of a common Linux application troubleshooting scenario, highlighting step-by-step problem-solving strategies for technical interviews.

Initial Troubleshooting Steps

  • Clarify the operating system and application involved in the issue.
  • Ask about the last time the application worked and if other users are affected.
  • Inquire about recent updates that could have impacted the application.

Checking for Recent Updates

  • Use the apt log to review recent package updates on Linux systems.
  • apt is a utility for installing applications and managing updates.
  • Log files for apt can be found at /var/log/apt, specifically history.log.
  • Use the grep command to filter log entries by the application's name.

Dependency and Permissions Checks

  • Run sudo apt-get update and sudo apt-get upgrade to ensure all dependencies are installed.
  • Attempt to relaunch the application after updating packages.

Investigating File Permissions

  • Identify the application's location (e.g., by right-clicking the desktop shortcut).
  • Use the which command to find the application’s binary path.
  • Use cd to navigate to the application's directory.
  • Run ls -l to view file permissions and ownership.

Understanding Permissions Output

  • The file permission string (e.g., -rwxr-x---) shows access rights for owner, group, and others.
  • Permissions are: r (read), w (write), x (execute).
  • Ownership is displayed as owner and group (e.g., root root).
  • Lack of execute permission for users prevents them from launching the application.

Resolving Permission Issues

  • Use the chmod command to modify file permissions appropriately.
  • After adjusting permissions, test the application again to confirm it works.

Follow-up Actions

  • Notify application owners about the issue and resolution to prevent widespread or recurring problems.
  • Document findings and the solution process.

Key Terms & Definitions

  • apt — Command-line utility for managing packages on Linux systems.
  • grep — Command-line tool to search for patterns within text files.
  • chmod — Command to change file permissions in Linux.
  • ls -l — Command to list files with detailed permissions and ownership.
  • Permissions — Access rights assigned to users (read, write, execute).

Action Items / Next Steps

  • Practice using Linux troubleshooting commands (apt, grep, chmod, ls -l).
  • Review how to interpret and modify Linux file permissions.
  • Prepare follow-up questions for clarifying issues during interviews.