🐧
Top 50 Linux / Shell Scripting Interview Questions & Answers (2026)
50 Questions
20 Beginner
20 Intermediate
10 Advanced
About Linux / Shell Scripting
This technology is widely used in software development and is a frequent topic in technical interviews at companies of all sizes.
What to Expect in a Linux / Shell Scripting Interview
Interviews cover both foundational concepts and practical application of this technology, with questions ranging from definitions to architectural decision-making.
How to Use This Guide
Work through questions in order of difficulty to build your understanding progressively. Bookmark challenging questions and revisit them before your interview.
Curated by Tech Baithak Editorial Team · Last updated: May 2026
Beginner
20 questions
Core concepts every Linux / Shell Scripting developer must know.
01
What do the ls, cd, pwd, mkdir, rm, cp, and mv commands do?
02
What are cat, less, and more used for?
03
How does grep work for searching text?
04
How does the find command work?
05
How do chmod and chown control file permissions?
06
How do ps and kill work for process management?
07
How do df and du help with disk usage?
08
What is top or htop and how do you use it?
09
How does SSH work and what are its basic usage patterns?
10
What is the pipe (|) operator in Linux?
11
What is the difference between > and >> for output redirection?
12
What are man pages and how do you use them?
13
What are which and whereis used for?
14
How do echo and printf work in bash?
15
What does the file command do and what is stat?
16
How do head and tail work for viewing file portions?
17
How does wc (word count) work?
18
How do sort and uniq work together?
19
How does tar work for archiving?
20
What are environment variables and how do you use $PATH and $HOME?
Intermediate
20 questions
Practical knowledge for developers with hands-on experience.
01
How does awk work for text processing?
02
How does sed work for stream editing?
03
How does cron work and how do you edit crontabs?
04
How does systemd work with systemctl?
05
How do you write if/for/while/case statements in bash?
06
How do bash functions work?
07
What is $? and how does exit status error handling work in bash?
08
How does trap work for signal handling in bash?
09
How do arrays work in bash?
10
How does xargs work for building command lines?
11
What does lsof do and when is it useful?
12
What are strace and ltrace used for?
13
How do netstat and ss show network connections?
14
How do you use the ip command for network configuration?
15
What are the basics of iptables for packet filtering?
16
What are /proc and /sys virtual filesystems in Linux?
17
What is the difference between a symbolic link and a hard link?
18
What does set -euo pipefail do in bash scripts?
19
What is a heredoc (<<EOF) in bash and when is it used?
20
What is process substitution in bash?
Advanced
10 questions
Deep expertise questions for senior and lead roles.
01
What are Linux namespaces and cgroups, and how do they underpin containers?
02
How do iptables and nftables handle packet filtering rules?
03
What is LVM (Logical Volume Manager) and what problems does it solve?
04
How does /etc/fstab work and what are important mount options?
05
How do sysctl kernel parameters work and what are important tuning examples?
06
How do you use perf and flame graphs for performance analysis on Linux?
07
Describe the Linux boot process from BIOS to init.
08
How does file descriptor management work in Linux (0/1/2, /dev/null, redirection internals)?
09
What are the key differences between POSIX sh and bash?
10
How do you write robust production shell scripts with locking and atomic writes?
Back to All Topics
50 questions total