Linux Interview Questions practice questions
10 questions in 1 test. Open one to answer it on its own, or take a whole test.
Test 1
Take Test 1 ›- During a deployment you run kill 4812 to stop an old worker process. Five minutes later ps still shows PID 4812 in state S (sleeping). The application's source shows it installs… · Processes & Signals
- On a busy host, ps -eo pid,ppid,stat,cmd shows several hundred entries in state Z marked <defunct>. All of them have the same parent PID, 2210, which belongs to a long-running… · Processes & Signals
- The directory /srv/shared has mode drwxrwxrwx (0777) so that every developer can drop files into it. Developers now complain that colleagues keep deleting and renaming files they… · Permissions
- An application writing session files to /var/spool/app starts failing with No space left on device. /var is an ext4 filesystem on a local disk, and df -h /var reports it as only… · Filesystems & Storage
- In a directory on a single ext4 filesystem, you run: ln report.csv hard.csv, then ln -s report.csv soft.csv, then rm report.csv What happens when you now run cat hard.csv and cat… · Filesystems & Storage
- You edit /etc/systemd/system/myapp.service to add an Environment=LOG_LEVEL=debug line to the [Service] section, then run systemctl restart myapp. The service restarts, but the… · systemd & Services
- A nightly bash script begins with set -e and contains these two lines: grep ERROR /var/log/app/today.log | sort | uniq -c > /tmp/report.txt echo "report ok" One night… · Shell, Text Processing & Pipes
- After a server reboot, nginx fails to start and its error log shows bind() to 0.0.0.0:80 failed (98: Address already in use). You suspect another service grabbed port 80 first… · Networking
- A 4-core application server alerts on a load average of 18.2, 17.9, 16.5. In top, the CPUs are about 95% idle, wa (I/O wait) is elevated, and ps shows dozens of application… · Performance, Load & Memory
- A backup script, /opt/backup/run.sh, works every time you run it from your terminal. You add it to your own user crontab with crontab -e, but the job's output shows pg_dump… · Scheduling & Automation