Interview Q&A / Linux & Shell

INTERVIEW Q&A · 63 QUESTIONS

Linux & Shell interview questions

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

  1. What 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.

    BeginnerQuick answer1 min read
  2. What 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.

    BeginnerQuick answer1 min read
  3. What 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.

    BeginnerQuick answer1 min read