Linux Troubleshooting

Systematic approach to identifying and resolving common Linux system issues using diagnostic tools and logs

Category
Linux
Level
advanced
Languages
en → en
Cards
56
Markdown
Linux Troubleshooting (.md)

Flashcards (56)

#Front (Term / Question)Back (Definition / Answer)ExampleMultiple-Choice Options
1How can you check the status of a specific network interface?Use 'ip link show interface_name' to check the status.
2How do you restart a service in Linux?Use 'sudo systemctl restart servicename' to restart a service.
3How can you find the location of a command in Linux?Use the command 'which commandname' to find its location.
4How can you check for memory usage on a Linux system?Use the command 'free -h' to check memory usage.
5What command is used to view the current kernel version?The command 'uname -r' displays the current kernel version.
6What file contains user account information in Linux?User account information is stored in '/etc/passwd'.
7What is the purpose of the '/etc/fstab' file?It contains information about disk drives and their mount points.
8What command can you use to view system resource usage in real-time?The command 'top' provides a real-time view of resource usage.
9How do you check for system errors in the kernel log?Use 'dmesg | grep -i error' to filter for errors in the kernel log.
10How can you check for open ports on a Linux system?Use the command 'netstat -tuln' to check for open ports.
11How do you check for installed packages on a Debian-based system?Use 'dpkg -l' to list installed packages.
12How can you view the last few lines of a log file in Linux?Use the command 'tail filename' to view the last lines.
13How can you check for available updates on a Debian-based system?Run 'sudo apt update' to check for available updates.
14How can you check the current runlevel of a Linux system?Use the command 'runlevel' to check the current runlevel.
15What is the purpose of the 'service' command?It is used to start, stop, or restart services in older init systems.
16How can you check the network configuration of a Linux system?Use the command 'ip addr' to view network configuration.
17What is the purpose of the 'mount' command?It is used to mount filesystems and devices.
18What command can you use to compress files in Linux?Use 'tar -czvf archive.tar.gz directory' to compress files.
19What command can you use to view system logs in real-time?The command 'tail -f /var/log/syslog' allows real-time log viewing.
20What is the purpose of the 'chown' command?'chown' changes the ownership of files and directories.
21What command is used to search for files in Linux?The command 'find' is used to search for files.
22How can you find out which users are currently logged in?Use the command 'who' to see currently logged-in users.
23What command would you use to check running processes in Linux?The command 'ps aux' lists all running processes.
24What command can you use to display the routing table?Use 'route -n' to display the routing table.
25What is the purpose of the 'grep' command?'grep' is used to search for specific patterns in text.
26How can you check the available memory on a Linux system?Use 'cat /proc/meminfo' to view detailed memory information.
27What command is used to create a new user in Linux?Use 'sudo adduser username' to create a new user.
28How can you check the system's hostname?Use the command 'hostname' to check the system's hostname.
29How do you check the status of a specific service in systemd?Use 'systemctl status servicename' to check the service status.
30How can you check the version of a specific package?Use 'apt show packagename' on Debian-based systems.
31What does the 'strace' command do?'strace' traces system calls and signals for a program.
32Which command is used to check the current disk usage in Linux?The command 'df -h' displays disk usage.
33What is the purpose of the 'sudo' command?'sudo' allows a permitted user to execute a command as the superuser or another user.
34What does the 'chmod 755' command do?It sets the file permissions to read, write, and execute for the owner, and read and execute for others.
35What command is used to change file permissions in Linux?The command 'chmod' is used to change file permissions.
36What command can you use to display disk usage by directory?Use 'du -h --max-depth=1' to display disk usage by directory.
37How can you view the contents of a directory in Linux?Use the command 'ls' to list the contents of a directory.
38How can you check the status of the firewall in Linux?Use 'sudo ufw status' to check the status of the firewall.
39How can you check for failed login attempts in Linux?View '/var/log/auth.log' for failed login attempts.
40What is the purpose of the 'ping' command?'ping' checks the connectivity to another network host.
41What does the 'df -i' command show?It displays inode usage for filesystems.
42What command can you use to view the contents of a text file?Use 'cat filename' to view the contents of a text file.
43How can you view the history of commands executed in the terminal?Use the command 'history' to view the command history.
44What is the purpose of the 'rsync' command?'rsync' is used for synchronizing files and directories.
45How can you check the disk space usage of a specific directory?Use 'du -sh directoryname' to check its disk space usage.
46What is the first step in troubleshooting a Linux system issue?Identify and define the problem clearly.
47What command can you use to kill a process by its PID?Use 'kill PID' to terminate a process by its process ID.
48How can you find out which processes are using the most CPU?Use 'top' or 'htop' to identify CPU-intensive processes.
49How can you check the status of disk drives in Linux?Use the command 'lsblk' to check the status of disk drives.
50How can you check the SELinux status on a Linux system?Use 'sestatus' to check the SELinux status.
51How can you find out which services are currently running on a Linux system?Use the command 'systemctl list-units --type=service'.
52How do you check the current user's home directory?Use the command 'echo $HOME' to display the current user's home directory.
53How can you check the uptime of a Linux system?Use the command 'uptime' to check how long the system has been running.
54What command can you use to view the system's environment variables?Use 'printenv' to view the environment variables.
55What is the purpose of the 'dmesg' command?It displays kernel-related messages and system boot logs.
56What does the 'systemctl list-timers' command do?It lists all active timers managed by systemd.