TOPIC-WISE INTERVIEW PRACTICE

Linux & Shell interview questions and quick answers

Permissions, processes, pipes and the commands you are expected to know cold.

Review 1,080 questions and short answers on Linux & Shell. Start with real examples below, then search, practise and follow links to full explanations.

1,080 questionsFree revision22 topics
START HERE

Linux & Shell: questions worth revising first

These answers come from AI Tapri's existing question bank and published interview guides. Open each answer and read the linked in-depth guide for examples and context.

01How do you stop a package from being upgraded on Debian or Ubuntu?

Use sudo apt-mark hold package to freeze it at the current version and apt-mark unhold to release it. For finer control, such as preferring a specific version or repository, use APT pinning in /etc/apt/preferences.d/.

Read the full explanation
02What is the difference between apt remove, purge and autoremove?

remove deletes a package's programs but keeps its configuration files. purge deletes the programs and the configs. autoremove deletes dependency packages that were installed automatically and are no longer needed by anything.

Read the full explanation
03What is the difference between apt update and apt upgrade?

apt update refreshes the local list of available packages and versions from the repositories but installs nothing. apt upgrade then installs newer versions of the packages you already have. Run update first, otherwise upgrade works from stale information.

Read the full explanation
04What is the difference between apt and apt-get?

apt is the newer, friendlier front-end for interactive use, with a progress bar and combined commands such as apt install and apt list. apt-get is the older, stable interface with predictable output, so it is preferred in scripts.

Read the full explanation
05How do you print specific columns of a command's output with awk?

awk splits each line into fields on whitespace and gives them as $1, $2 and so on, with $NF as the last and $0 as the whole line. awk '{print $1, $3}' prints columns 1 and 3. Use -F to set another separator, such as -F: for /etc/passwd.

Read the full explanation
06What is the difference between /bin, /usr/bin and /sbin?

/bin and /usr/bin hold commands every user can run; /sbin and /usr/sbin hold system administration tools such as fdisk or iptables. On modern distributions /bin is a symlink to /usr/bin, so the old split between them no longer exists in practice.

Read the full explanation
07What is Linux?

Open-source Unix-like OS kernel. Runs on servers, desktops, IoT. Free, portable, modular.

08Explain distros.

Linux distributions bundle kernel + utilities. Ubuntu, CentOS, Debian, Fedora. Different package managers, defaults.

YOUR PRACTICE SPACE

Find your next answer.

Pick a topic, search a keyword, or open a question to reveal the answer.

1,080 questions available
LINUX & SHELL

Linux & Shell quick answers

Showing 18 of 1080
1062 remaining

Free to practise. No account needed. Made for quick revision, not rote memorisation.

Keep preparing for Linux & Shell

Quick answers help with recall; detailed guides explain the reasoning, examples and common mistakes behind each answer.

More topics to practise