Linux · Systems fluency

What is the difference between the kernel and the shell?

EasykernelshellsyscallsUpdated Oct 2026
Quiz this track

Short answer

The kernel manages hardware and system resources through system calls. The shell is a userland program that reads your commands, expands them, and launches other programs that talk to the kernel.

The kernel runs in a privileged mode and controls CPU scheduling, memory, devices, filesystems, and networking. A normal program cannot touch hardware directly; it asks the kernel through system calls such as open, read, fork, and execve.

The shell is an ordinary process. It parses command lines, performs expansion and redirection, and uses system calls to start child processes. Bash, zsh, and fish are shells; each is replaceable without changing the kernel.

sh
echo "$SHELL"
ps -p $$ -o pid,ppid,comm
The second command shows that the shell is just another process with a parent and a process ID.

Where the line sits

  • Kernel: privileged, shared, and responsible for isolation between processes
  • Shell: unprivileged by default, interactive or scripted, one process per session
  • Shell built-ins such as cd run inside the shell process
  • External commands such as ls and grep run as child processes
A shell does not enforce filesystem permissions. The kernel does. The shell only makes requests, and the kernel accepts or rejects them based on credentials.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What happens between typing a command and the program running?
  2. 2Which shell built-ins cannot be replaced by an external binary?
  3. 3How does a program request privileged work from the kernel?
  4. 4Can you run Linux without a shell?

Say it in the interview

The kernel is the privileged core that manages hardware, memory, processes, and permissions. The shell is a userland program that reads commands, expands them, and launches child processes. Shell built-ins like cd happen inside the shell, while external commands run as separate processes. The shell never bypasses the kernel; every file or network operation still goes through a system call.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live Linux mock interview and get scored feedback on depth, clarity and confidence.